Trace.Hpc.Util

hpc-0.6.0.3: Code Coverage Library for Haskell

Safe Haskell | Safe
Language | Haskell98

Trace.Hpc.Util

Description

Minor utilities for the HPC tools.

Synopsis

- data HpcPos
- fromHpcPos :: HpcPos -> (Int, Int, Int, Int)
- toHpcPos :: (Int, Int, Int, Int) -> HpcPos
- insideHpcPos :: HpcPos -> HpcPos -> Bool
- class HpcHash a where
- data Hash
- catchIO :: IO a -> (IOException -> IO a) -> IO a

# Documentation

data HpcPos Source #

`HpcPos` is an Hpc local rendition of a Span.

Instances

Eq HpcPos # |
Methods (==) :: HpcPos -> HpcPos -> Bool # (/=) :: HpcPos -> HpcPos -> Bool #
Ord HpcPos # |
Methods compare :: HpcPos -> HpcPos -> Ordering # (<) :: HpcPos -> HpcPos -> Bool # (<=) :: HpcPos -> HpcPos -> Bool # (>) :: HpcPos -> HpcPos -> Bool # (>=) :: HpcPos -> HpcPos -> Bool # max :: HpcPos -> HpcPos -> HpcPos # min :: HpcPos -> HpcPos -> HpcPos #
Read HpcPos # |
Methods readsPrec :: Int -> ReadS HpcPos Source # readList :: ReadS [HpcPos] Source # readPrec :: ReadPrec HpcPos Source # readListPrec :: ReadPrec [HpcPos] Source #
Show HpcPos # |
Methods showsPrec :: Int -> HpcPos -> ShowS Source # show :: HpcPos -> String Source # showList :: [HpcPos] -> ShowS Source #
HpcHash HpcPos # |
Methods toHash :: HpcPos -> Hash Source #

fromHpcPos :: HpcPos -> (Int, Int, Int, Int) Source #

`fromHpcPos` explodes the HpcPos into line:column-line:column

toHpcPos :: (Int, Int, Int, Int) -> HpcPos Source #

`toHpcPos` implodes to HpcPos, from line:column-line:column

insideHpcPos :: HpcPos -> HpcPos -> Bool Source #

Predicate determining whether the first argument is inside the second argument.

class HpcHash a where Source #

Minimal complete definition

toHash

Methods

toHash :: a -> Hash Source #

Instances

HpcHash Bool # |
Methods toHash :: Bool -> Hash Source #
HpcHash Char # |
Methods toHash :: Char -> Hash Source #
HpcHash Int # |
Methods toHash :: Int -> Hash Source #
HpcHash Integer # |
Methods toHash :: Integer -> Hash Source #
HpcHash HpcPos # |
Methods toHash :: HpcPos -> Hash Source #
HpcHash CondBox # |
Methods toHash :: CondBox -> Hash Source #
HpcHash BoxLabel # |
Methods toHash :: BoxLabel -> Hash Source #
HpcHash a => HpcHash [a] # |
Methods toHash :: [a] -> Hash Source #
(HpcHash a, HpcHash b) => HpcHash (a, b) # |
Methods toHash :: (a, b) -> Hash Source #

data Hash Source #

Instances

Eq Hash # |
Methods (==) :: Hash -> Hash -> Bool # (/=) :: Hash -> Hash -> Bool #
Num Hash # |
Methods (+) :: Hash -> Hash -> Hash Source # (-) :: Hash -> Hash -> Hash Source # (*) :: Hash -> Hash -> Hash Source # negate :: Hash -> Hash Source # abs :: Hash -> Hash Source # signum :: Hash -> Hash Source # fromInteger :: Integer -> Hash Source #
Read Hash # |
Methods readsPrec :: Int -> ReadS Hash Source # readList :: ReadS [Hash] Source # readPrec :: ReadPrec Hash Source # readListPrec :: ReadPrec [Hash] Source #
Show Hash # |
Methods showsPrec :: Int -> Hash -> ShowS Source # show :: Hash -> String Source # showList :: [Hash] -> ShowS Source #

catchIO :: IO a -> (IOException -> IO a) -> IO a Source #