monad-levels- Specific levels of monad transformers

Copyright(c) Ivan Lazar Miljenovic
License3-Clause BSD-style
Safe HaskellNone



Note that the original definitions are used for the various reader, writer and state computations: as such, if there is (for example) another level that satisfies 'IsReader r' above the one that satisfies 'IsRWS r w s' in the stack, then calling ask will use the higher level.



type HasRWS r w s m = SatisfyConstraint (IsRWS r w s) m Source

class (IsReader r m, IsWriter w m, IsState s m) => IsRWS r w s m Source

Defined as another class rather than an alias in case you need to ensure the same level satisfies all three constraints (and to have a specific ValidConstraint instance).


(MonadTower m, Monoid w) => IsRWS r w s (RWST r w s m) 
(MonadTower m, Monoid w) => IsRWS r w s (RWST r w s m) 
Monoid w => ValidConstraint (IsRWS r w s) 
type ConstraintSatisfied (IsRWS r w s) m