hpc-0.7.0.2: Code Coverage Library for Haskell
Safe HaskellNone
LanguageHaskell98

Trace.Hpc.Util

Description

Minor utilities for the HPC tools.

Synopsis

Documentation

data HpcPos #

HpcPos is an Hpc local rendition of a Span.

Instances

Instances details
Eq HpcPos # 
Instance details

Defined in Trace.Hpc.Util

Methods

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

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

Ord HpcPos # 
Instance details

Defined in Trace.Hpc.Util

Read HpcPos # 
Instance details

Defined in Trace.Hpc.Util

Show HpcPos # 
Instance details

Defined in Trace.Hpc.Util

HpcHash HpcPos # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: HpcPos -> Hash #

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

Instances details
HpcHash BoxLabel # 
Instance details

Defined in Trace.Hpc.Mix

Methods

toHash :: BoxLabel -> Hash #

HpcHash CondBox # 
Instance details

Defined in Trace.Hpc.Mix

Methods

toHash :: CondBox -> Hash #

HpcHash HpcPos # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: HpcPos -> Hash #

HpcHash Integer # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: Integer -> Hash #

HpcHash Bool # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: Bool -> Hash #

HpcHash Char # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: Char -> Hash #

HpcHash Int # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: Int -> Hash #

HpcHash a => HpcHash [a] # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: [a] -> Hash #

(HpcHash a, HpcHash b) => HpcHash (a, b) # 
Instance details

Defined in Trace.Hpc.Util

Methods

toHash :: (a, b) -> Hash #

data Hash #

Instances

Instances details
NFData Hash #

Since: hpc-0.6.2.0

Instance details

Defined in Trace.Hpc.Util

Methods

rnf :: Hash -> () Source #

Eq Hash # 
Instance details

Defined in Trace.Hpc.Util

Methods

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

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

Generic Hash # 
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.7.0.2-7eca" 'True) (C1 ('MetaCons "Hash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

Methods

from :: Hash -> Rep Hash x #

to :: Rep Hash x -> Hash #

Num Hash # 
Instance details

Defined in Trace.Hpc.Util

Methods

(+) :: Hash -> Hash -> Hash #

(-) :: Hash -> Hash -> Hash #

(*) :: Hash -> Hash -> Hash #

negate :: Hash -> Hash #

abs :: Hash -> Hash #

signum :: Hash -> Hash #

fromInteger :: Integer -> Hash #

Read Hash # 
Instance details

Defined in Trace.Hpc.Util

Show Hash # 
Instance details

Defined in Trace.Hpc.Util

Methods

showsPrec :: Int -> Hash -> ShowS #

show :: Hash -> String #

showList :: [Hash] -> ShowS #

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.7.0.2-7eca" 'True) (C1 ('MetaCons "Hash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

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

readFileUtf8 :: FilePath -> IO String #

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 () #

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