IxStateM is imported by: StateM.

moduleIxStateM(HasState(..),StateM,withSt,withStS,mapState)whereimportMTimportControl_Monad_FixnewtypeStateMsa=S{ ($$)::s->(a,s) }withSt::s->StateMsa->awithStsm=fst(m$$s)withStS::s->StateMsa->(a,s)withStSsm=m$$smapState::(t->s)->(s->t)->StateMsa->StateMtamapStateinFoutFm=S(\s->let(a,s1)=m$$inFsin(a,outFs1))instanceFunctor(StateMs)wherefmapfm=m>>=return.finstanceMonad(StateMs)wherereturnx=S(\s->(x,s) )f>>=g=S(\s->let(x,s1)=f$$singx$$s1)instanceHasState(StateMs)ZswhereupdSt_f=S(\s->(s,fs))updSt__f=S(\s->((),fs))getSt_=S(\s->(s,s))setSt_s=S(\t->(t,s))setSt__s=S(\_->((),s))instanceMonadFix(StateMs)wheremfixf=S(\s->letSm=fa(a,s1)=casemsof(a,s1)->(a,s1)in(a,s1))instanceHasBaseMonad(StateMs) (StateMs)whereinBase=id

Index

(HTML for this module was generated on 2006-08-12. About the conversion tool.)