| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.MockCat.Internal.MockRegistry
Synopsis
- attachVerifierToFn :: forall fn params. Typeable (InvocationRecorder params) => fn -> (Maybe MockName, InvocationRecorder params) -> IO ()
- lookupVerifierForFn :: fn -> IO (Maybe (Maybe MockName, Dynamic))
- register :: forall fn params. (Typeable params, Typeable (InvocationRecorder params), Typeable fn) => Maybe MockName -> InvocationRecorder params -> fn -> IO fn
- registerUnitMeta :: TVar ref -> IO UnitMeta
- lookupUnitMeta :: TVar ref -> IO (Maybe UnitMeta)
- data UnitMeta
- withUnitGuard :: UnitMeta -> IO a -> IO a
- withAllUnitGuards :: IO a -> IO a
- markUnitUsed :: UnitMeta -> IO ()
- isGuardActive :: UnitMeta -> IO Bool
Documentation
attachVerifierToFn :: forall fn params. Typeable (InvocationRecorder params) => fn -> (Maybe MockName, InvocationRecorder params) -> IO () Source #
register :: forall fn params. (Typeable params, Typeable (InvocationRecorder params), Typeable fn) => Maybe MockName -> InvocationRecorder params -> fn -> IO fn Source #
Register a recorder for a function in the global mock registry.
This handles the special () (unit) case by creating a tracked wrapper
and registering both the tracked and base values so StableName lookup
succeeds regardless of which closure is later passed for verification.
withAllUnitGuards :: IO a -> IO a Source #
markUnitUsed :: UnitMeta -> IO () Source #