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 Source # |
Instance details Defined in Trace.Hpc.Util Methods (==) :: HpcPos -> HpcPos -> Bool # (/=) :: HpcPos -> HpcPos -> Bool #
Ord HpcPos Source # |
Instance details Defined in Trace.Hpc.Util 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 Source # |
Instance details Defined in Trace.Hpc.Util Methods readsPrec :: Int -> ReadS HpcPos Source # readList :: ReadS [HpcPos] Source # readPrec :: ReadPrec HpcPos Source # readListPrec :: ReadPrec [HpcPos] Source #
Show HpcPos Source # |
Instance details Defined in Trace.Hpc.Util Methods showsPrec :: Int -> HpcPos -> ShowS Source # show :: HpcPos -> String Source # showList :: [HpcPos] -> ShowS Source #
HpcHash HpcPos Source # |
Instance details Defined in Trace.Hpc.Util 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 Source # |
Instance details Defined in Trace.Hpc.Util Methods toHash :: Bool -> Hash Source #
HpcHash Char Source # |
Instance details Defined in Trace.Hpc.Util Methods toHash :: Char -> Hash Source #
HpcHash Int Source # |
Instance details Defined in Trace.Hpc.Util Methods toHash :: Int -> Hash Source #
HpcHash Integer Source # |
Instance details Defined in Trace.Hpc.Util Methods toHash :: Integer -> Hash Source #
HpcHash HpcPos Source # |
Instance details Defined in Trace.Hpc.Util Methods toHash :: HpcPos -> Hash Source #
HpcHash CondBox Source # |
Instance details Defined in Trace.Hpc.Mix Methods toHash :: CondBox -> Hash Source #
HpcHash BoxLabel Source # |
Instance details Defined in Trace.Hpc.Mix Methods toHash :: BoxLabel -> Hash Source #
HpcHash a => HpcHash [a] Source # |
Instance details Defined in Trace.Hpc.Util Methods toHash :: [a] -> Hash Source #
(HpcHash a, HpcHash b) => HpcHash (a, b) Source # |
Instance details Defined in Trace.Hpc.Util Methods toHash :: (a, b) -> Hash Source #

data Hash Source #

Instances

Eq Hash Source # |
Instance details Defined in Trace.Hpc.Util Methods (==) :: Hash -> Hash -> Bool # (/=) :: Hash -> Hash -> Bool #
Num Hash Source # |
Instance details Defined in Trace.Hpc.Util 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 Source # |
Instance details Defined in Trace.Hpc.Util Methods readsPrec :: Int -> ReadS Hash Source # readList :: ReadS [Hash] Source # readPrec :: ReadPrec Hash Source # readListPrec :: ReadPrec [Hash] Source #
Show Hash Source # |
Instance details Defined in Trace.Hpc.Util Methods showsPrec :: Int -> Hash -> ShowS Source # show :: Hash -> String Source # showList :: [Hash] -> ShowS Source #

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