Safe Haskell | None |
---|
Laws for the MonadState
class. A submodule has a
main
which runs quite a
few tests for the lazy and strict state monads.
Documentation
class MonadState s m => MonadStateLaws s m whereSource
monadStatePutPut :: Law (MonadStatePutPut s m)Source
monadStatePutGet :: Law (MonadStatePutGet s m)Source
monadStateGetPut :: Law (MonadStateGetPut m)Source
monadStateGetGet :: Law (MonadStateGetGet s a m)Source
MonadState s (SS s) => MonadStateLaws s (SS s) | |
MonadState s (State s) => MonadStateLaws s (State s) |
defaultMonadStatePutPut :: MonadState s m => (s, s) -> Theorem (m ())Source
defaultMonadStatePutGet :: MonadState b m => b -> Theorem (m b)Source
defaultMonadStateGetPut :: MonadState a m => t -> Theorem (m ())Source
defaultMonadStateGetGet :: MonadState a m => (a -> a -> m b) -> Theorem (m b)Source
data MonadStatePutPut s m Source
(MonadStateLaws s m, TestEqual (m ())) => LawTest (MonadStatePutPut s m) |
data MonadStatePutGet s m Source
(MonadStateLaws s m, TestEqual (m s)) => LawTest (MonadStatePutGet s m) |
data MonadStateGetPut m Source
(MonadStateLaws s m, TestEqual (m ())) => LawTest (MonadStateGetPut m) |
data MonadStateGetGet s a m Source
(MonadStateLaws s m, TestEqual (m a)) => LawTest (MonadStateGetGet s a m) |