Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Assert r where
- Assert :: String -> (EmulatorState -> Bool) -> Assert ()
- assert :: forall effs. Member Assert effs => String -> (EmulatorState -> Bool) -> Eff effs ()
- handleAssert :: forall effs effs2 a. (Member (Yield (EmSystemCall effs2 EmulatorMessage a) (Maybe EmulatorMessage)) effs, Member (Error EmulatorRuntimeError) effs, Member (State EmulatorState) effs) => Assert ~> Eff effs
Documentation
assert :: forall effs. Member Assert effs => String -> (EmulatorState -> Bool) -> Eff effs () Source #
handleAssert :: forall effs effs2 a. (Member (Yield (EmSystemCall effs2 EmulatorMessage a) (Maybe EmulatorMessage)) effs, Member (Error EmulatorRuntimeError) effs, Member (State EmulatorState) effs) => Assert ~> Eff effs Source #
Pass EmulatorState
to the provided predicate and throw error unless it's true.