hpc-0.6.2.0: Code Coverage Library for Haskell
Safe HaskellTrustworthy
LanguageHaskell98

Trace.Hpc.Util

Description

Minor utilities for the HPC tools.

Synopsis

Documentation

data HpcPos Source #

HpcPos is an Hpc local rendition of a Span.

Instances

Instances details
Read HpcPos Source # 
Instance details

Defined in Trace.Hpc.Util

Show HpcPos Source # 
Instance details

Defined in Trace.Hpc.Util

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

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 #

Methods

toHash :: a -> Hash Source #

Instances

Instances details
HpcHash BoxLabel Source # 
Instance details

Defined in Trace.Hpc.Mix

Methods

toHash :: BoxLabel -> Hash Source #

HpcHash CondBox Source # 
Instance details

Defined in Trace.Hpc.Mix

Methods

toHash :: CondBox -> Hash Source #

HpcHash HpcPos Source # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: HpcPos -> Hash Source #

HpcHash Integer Source # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: Integer -> Hash Source #

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 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

Instances details
Generic Hash Source # 
Instance details

Defined in Trace.Hpc.Util

Associated Types

type Rep Hash

Since: hpc-0.6.2.0

Instance details

Defined in Trace.Hpc.Util

type Rep Hash = D1 ('MetaData "Hash" "Trace.Hpc.Util" "hpc-0.6.2.0-37c0" 'True) (C1 ('MetaCons "Hash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

Methods

from :: Hash -> Rep Hash x Source #

to :: Rep Hash x -> Hash Source #

Num Hash Source # 
Instance details

Defined in Trace.Hpc.Util

Read Hash Source # 
Instance details

Defined in Trace.Hpc.Util

Show Hash Source # 
Instance details

Defined in Trace.Hpc.Util

NFData Hash Source #

Since: hpc-0.6.2.0

Instance details

Defined in Trace.Hpc.Util

Methods

rnf :: Hash -> () Source #

Eq Hash Source # 
Instance details

Defined in Trace.Hpc.Util

Methods

(==) :: Hash -> Hash -> Bool #

(/=) :: Hash -> Hash -> Bool #

type Rep Hash Source #

Since: hpc-0.6.2.0

Instance details

Defined in Trace.Hpc.Util

type Rep Hash = D1 ('MetaData "Hash" "Trace.Hpc.Util" "hpc-0.6.2.0-37c0" 'True) (C1 ('MetaCons "Hash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

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

readFileUtf8 :: FilePath -> IO String Source #

Read a file strictly, as opposed to how readFile does it using lazy IO, but also disregard system locale and assume that the file is encoded in UTF-8. Haskell source files are expected to be encoded in UTF-8 by GHC.

writeFileUtf8 :: FilePath -> String -> IO () Source #

Write file in UTF-8 encoding. Parent directory will be created if missing.