mutagen-0.1.0.0: Property-based testing framework for Haskell using type-preserving mutations.
Safe HaskellNone
LanguageHaskell2010

Test.Mutagen.Tracer

Description

Public API for the Mutagen Tracer plugin.

Synopsis

Documentation

trace :: TraceNode -> a -> a Source #

Trace the evaluation of a given TraceNode.

This function is intended to be used by the GHC plugin to instrument code.

data TRACE Source #

Tell the tracer plugin to trace this function.

For example:

 {-# ANN myFunction TRACE #-}
 myFunction :: Int -> Int
 myFunction x = x + 1

Constructors

TRACE 

Instances

Instances details
Data TRACE Source # 
Instance details

Defined in Test.Mutagen.Tracer.Annotation

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TRACE -> c TRACE #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TRACE #

toConstr :: TRACE -> Constr #

dataTypeOf :: TRACE -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TRACE) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TRACE) #

gmapT :: (forall b. Data b => b -> b) -> TRACE -> TRACE #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TRACE -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TRACE -> r #

gmapQ :: (forall d. Data d => d -> u) -> TRACE -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TRACE -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TRACE -> m TRACE #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TRACE -> m TRACE #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TRACE -> m TRACE #

type TraceNode = Int Source #

AST node identifiers.

withTrace :: IO a -> IO (a, Trace) Source #

Run a computation and obtain its trace.

truncateTrace :: Int -> Trace -> Trace Source #

Truncate a trace to a given length.