hpc-0.6.2.0: Code Coverage Library for Haskell

Safe Haskell | Safe
Language | Haskell98

Trace.Hpc.Mix

Description

Datatypes and file-access routines for the per-module (`.mix`) indexes used by Hpc.

Synopsis

- data Mix = Mix FilePath UTCTime Hash Int [MixEntry]
- type MixEntry = (HpcPos, BoxLabel)
- data BoxLabel
  - = ExpBox Bool
  - | TopLevelBox [String]
  - | LocalBox [String]
  - | BinBox CondBox Bool
- data CondBox
  - = GuardBinBox
  - | CondBinBox
  - | QualBinBox
- mixCreate :: String -> String -> Mix -> IO ()
- readMix :: [String] -> Either String TixModule -> IO Mix
- createMixEntryDom :: Show a => [(HpcPos, a)] -> [MixEntryDom [a]]
- type MixEntryDom a = Tree (HpcPos, a)

# Documentation

data Mix Source #

`Mix` is the information about a modules static properties, like location of Tix's in a file.

Tab stops are the size of a tab in the provided line:column values.

- In GHC, this is 1 (a tab is just a character)
- With `hpc-tracer`, this is 8 (a tab represents several spaces).

Constructors

Mix FilePath UTCTime Hash Int [MixEntry] |

#### Instances

Instances details

Read Mix Source # |
Instance details Defined in Trace.Hpc.Mix Methods readsPrec :: Int -> ReadS Mix Source # readList :: ReadS [Mix] Source # readPrec :: ReadPrec Mix Source # readListPrec :: ReadPrec [Mix] Source #
Show Mix Source # |
Instance details Defined in Trace.Hpc.Mix Methods showsPrec :: Int -> Mix -> ShowS Source # show :: Mix -> String Source # showList :: [Mix] -> ShowS Source #
Eq Mix Source # |
Instance details Defined in Trace.Hpc.Mix Methods (==) :: Mix -> Mix -> Bool # (/=) :: Mix -> Mix -> Bool #

type MixEntry = (HpcPos, BoxLabel) Source #

data BoxLabel Source #

Constructors

ExpBox Bool |
TopLevelBox [String] |
LocalBox [String] |
BinBox CondBox Bool |

#### Instances

Instances details

Read BoxLabel Source # |
Instance details Defined in Trace.Hpc.Mix Methods readsPrec :: Int -> ReadS BoxLabel Source # readList :: ReadS [BoxLabel] Source # readPrec :: ReadPrec BoxLabel Source # readListPrec :: ReadPrec [BoxLabel] Source #
Show BoxLabel Source # |
Instance details Defined in Trace.Hpc.Mix Methods showsPrec :: Int -> BoxLabel -> ShowS Source # show :: BoxLabel -> String Source # showList :: [BoxLabel] -> ShowS Source #
Eq BoxLabel Source # |
Instance details Defined in Trace.Hpc.Mix Methods (==) :: BoxLabel -> BoxLabel -> Bool # (/=) :: BoxLabel -> BoxLabel -> Bool #
Ord BoxLabel Source # |
Instance details Defined in Trace.Hpc.Mix Methods compare :: BoxLabel -> BoxLabel -> Ordering # (<) :: BoxLabel -> BoxLabel -> Bool # (<=) :: BoxLabel -> BoxLabel -> Bool # (>) :: BoxLabel -> BoxLabel -> Bool # (>=) :: BoxLabel -> BoxLabel -> Bool # max :: BoxLabel -> BoxLabel -> BoxLabel # min :: BoxLabel -> BoxLabel -> BoxLabel #
HpcHash BoxLabel Source # |
Instance details Defined in Trace.Hpc.Mix Methods toHash :: BoxLabel -> Hash Source #

data CondBox Source #

Constructors

GuardBinBox |
CondBinBox |
QualBinBox |

#### Instances

Instances details

Read CondBox Source # |
Instance details Defined in Trace.Hpc.Mix Methods readsPrec :: Int -> ReadS CondBox Source # readList :: ReadS [CondBox] Source # readPrec :: ReadPrec CondBox Source # readListPrec :: ReadPrec [CondBox] Source #
Show CondBox Source # |
Instance details Defined in Trace.Hpc.Mix Methods showsPrec :: Int -> CondBox -> ShowS Source # show :: CondBox -> String Source # showList :: [CondBox] -> ShowS Source #
Eq CondBox Source # |
Instance details Defined in Trace.Hpc.Mix Methods (==) :: CondBox -> CondBox -> Bool # (/=) :: CondBox -> CondBox -> Bool #
Ord CondBox Source # |
Instance details Defined in Trace.Hpc.Mix Methods compare :: CondBox -> CondBox -> Ordering # (<) :: CondBox -> CondBox -> Bool # (<=) :: CondBox -> CondBox -> Bool # (>) :: CondBox -> CondBox -> Bool # (>=) :: CondBox -> CondBox -> Bool # max :: CondBox -> CondBox -> CondBox # min :: CondBox -> CondBox -> CondBox #
HpcHash CondBox Source # |
Instance details Defined in Trace.Hpc.Mix Methods toHash :: CondBox -> Hash Source #

mixCreate Source #

Arguments

:: String | Dir Name
-> String | module Name
-> Mix | Mix DataStructure
-> IO () |

Create is mix file.

readMix Source #

Arguments

:: [String] | Dir Names
-> Either String TixModule | module wanted
-> IO Mix |

Read a mix file.

createMixEntryDom :: Show a => [(HpcPos, a)] -> [MixEntryDom [a]] Source #

type MixEntryDom a = Tree (HpcPos, a) Source #