ribosome-test-0.9.9.9: Test tools for Ribosome
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ribosome.Test.Error

Synopsis

Documentation

resumeTestError :: forall eff err r. Show err => Members [eff !! err, Error TestError] r => InterpreterFor eff r Source #

Resume an effect and convert its error from Stop err to Error TestError.

testHandler :: Member (Error TestError) r => Handler r a -> Sem r a Source #

Run a Handler, converting the Stop Report at its head to Error TestError.

testHandlerAsync :: Members [Error TestError, Async] r => Handler r a -> Sem r (Sem r a) Source #

Run a Handler in a new thread and return an action that waits for the thread to terminate when sequenced. Converts the Stop Report at its head to Error TestError when it is awaited.

testError :: forall err r a. Reportable err => Member (Error TestError) r => Sem (Stop err ': r) a -> Sem r a Source #

Interpret Stop err to Error TestError by using err's instance of Reportable.