hpc-0.6.0.2: 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
  - toHash :: a -> Hash
- data Hash
- catchIO :: IO a -> (IOException -> IO a) -> IO a

# Documentation

data HpcPos

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

Instances

Eq HpcPos |
Ord HpcPos |
Read HpcPos |
Show HpcPos |
HpcHash HpcPos |

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

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

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

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

insideHpcPos :: HpcPos -> HpcPos -> Bool

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

class HpcHash a where

Methods

toHash :: a -> Hash

Instances

HpcHash Bool |
HpcHash Char |
HpcHash Int |
HpcHash Integer |
HpcHash HpcPos |
HpcHash CondBox |
HpcHash BoxLabel |
HpcHash a => HpcHash [a] |
(HpcHash a, HpcHash b) => HpcHash (a, b) |

data Hash

Instances

Eq Hash |
Num Hash |
Read Hash |
Show Hash |

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