mockcat-1.0.1.0: Declarative mocking with a single arrow `~>`.
Safe HaskellNone
LanguageHaskell2010

Test.MockCat.Internal.MockRegistry

Synopsis

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.