w~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r stuvwxy z { |} ;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Inferedgg (a,w) embeds a simple writer action. hh w' is an action that produces the output w. ii m' is an action that executes the action m and adds - its output to the value of the computation. jj m' is an action that executes the action m, which A returns a value and a function, and returns the value, applying  the function to the output. kk f m' is an action that executes the action m and adds  the result of applying f0 to the output to the value of the computation.  k f m = ~ (id *** f) (i m)ll f m' is an action that executes the action m and  applies the function f) to its output, leaving the return value  unchanged.  l f m = j (~ (\x -> (x,f)) m)fghijklfghijklfghijkl fghijkl ;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Inferedm%Minimal definition is either both of get and put or just state n2Return the state from the internals of the monad. o$Replace the state inside the monad. p,Embed a simple state action into the monad. qMonadic state transformer. 7Maps an old state to a new state inside a state monad. $ The old state is thrown away.  + Main> :t modify ((+1) :: Int -> Int) 1 modify (...) :: (MonadState Int a) => a () This says that  modify (+1) acts over any " Monad that is a member of the  MonadState class,  with an Int state. rBGets specific component of the state, using a projection function  supplied. mnopqrmnopqrmnopqrmnopqr;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-InferedsSee examples in Control.Monad.Reader. + Note, the partially applied function type (->) r is a simple reader monad.  See the instance declaration below. t!Retrieves the monad environment. u2Executes a computation in a modified environment. v1Retrieves a function of the current environment. w1Retrieves a function of the current environment. stu(The function to modify the environment. Reader% to run in the modified environment. v3The selector function to apply to the environment. w3The selector function to apply to the environment. stuvwstuvwstuvw;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Inferedxfghijklmnopqrstuvwxxxportable experimentallibraries@haskell.org Safe-Infered/~ +non-portable (multi-parameter type classes) experimentallibraries@haskell.org Safe-InferedyAThe strategy of combining computations that can throw exceptions by bypassing bound functions Gfrom the point an exception is thrown to the point that it is handled. 8Is parameterized over the type of error information and the monad type constructor. It is common to use  String as the monad type constructor Ifor an error monad in which error descriptions take the form of strings. PIn that case and many other common cases the resulting monad is already defined as an instance of the y class. +You can also define your own error type and/ or use a monad type constructor  other than   or  . CIn these cases you will have to explicitly define instances of the X and/or y classes. zDIs used within a monadic computation to begin exception processing. {MA handler function to handle previous errors and return to normal execution.  A common idiom is:  7 do { action1; action2; action3 } `catchError` handler  where the action functions can call z.  Note that handler2 and the do-block must have the same return type. yz{VWXyz{XWVyz{yz{portable experimentallibraries@haskell.org Safe-Infered}callCC" (call-with-current-continuation) D calls a function with the current continuation as its argument. P Provides an escape continuation mechanism for use with Continuation monads. K Escape continuations allow to abort the current computation and return  a value immediately. % They achieve a similar effect to    and    within an   monad. , Advantage of this function over calling return is that it makes  the continuation explicit, 1 allowing more flexibility and better control  (see examples in Control.Monad.Cont). The standard idiom used with callCC# is to provide a lambda-expression K to name the continuation. Then calling the named continuation anywhere 7 within its scope will escape from the computation, ? even if it is many layers deep within nested computations. |}|}|} |}portable experimentallibraries@haskell.org Safe-Infered +non-portable (multi-parameter type classes) experimentallibraries@haskell.org Safe-Infered:~UVWXYZ[yz{ yz{XWV[ZYUportable experimentallibraries@haskell.org Safe-Infered1~QRSTTSRQ;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Inferedn~     :;<=>?@ABCDEFGfghijklmnopqrstuvwxDCBA@?>GFE=<;:;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Inferedn~     :;<=>?@ABCDEFGfghijklmnopqrstuvwx;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Infered>~HIJKLMNOPstuvwstuvwMLKJPONIH;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Inferedn~     ,-./0123456789fghijklmnopqrstuvwx6543210987/.-,;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-InferedC~ !"#$%&'()*+mnopqrmnopqr('&%$#+*)"! ;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-InferedC~ !"#$%&'()*+mnopqr;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-InferedC~mnopqrmnopqr;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Infered]~      fghijklfghijkl  ;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Infered]~      fghijkl;non-portable (multi-param classes, functional dependencies) experimentallibraries@haskell.org Safe-Infered]~     fghijklfghijkl portable experimentallibraries@haskell.org Safe-Infered9~\]^_`abcde|} |}ba`_^edc]\ !"#$$%%%% %!%"%#%$%$&'&(&)&*&+&,&-&.&/&0&1&2&23'3(3)3*3+3,3-3.3/3031323245464748494:4;4<4=4>4?4@4A4AB5B6B7B8B9B:B;B<B=B>B?B@BABACDCECFCGCHCICJCKCKLMLNLOLOPQPRPSPPTPUPUVWVXVYVZV[V\V]V^V_V_ ` a b c d e f g h i j k lmnopqr s  tuvwx y z { | } ~  vvvvvvvwvvvvwvvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvwvvv vvvvvvvvvvvvvvvvvvvvvvvvvvv v v  mtl-2.1Control.Monad.Writer.StrictControl.Monad.Writer.LazyControl.Monad.State.StrictControl.Monad.State.LazyControl.Monad.RWS.StrictControl.Monad.RWS.LazyControl.Monad.ReaderControl.Monad.ListControl.Monad.ErrorControl.Monad.Error.ClassControl.Monad.ContControl.Monad.Writer.ClassControl.Monad.State.ClassControl.Monad.Reader.ClassControl.Monad.RWS.ClassControl.Monad.Cont.ClassControl.Monad.IdentityDataEither throwError catchErrorErrorControl.Monad.TransControl.Monad.RWSControl.Monad.StateControl.Monad.Writertransformers-0.3.0.0!Control.Monad.Trans.Writer.Strict mapWriterT execWriterT mapWriter execWriter runWriterWriter runWriterTWriterTControl.Monad.Trans.Writer.Lazy Control.Monad.Trans.State.Strict withStateT mapStateT execStateT evalStateT withStatemapState execState evalStaterunStateState runStateTStateTControl.Monad.Trans.State.LazyControl.Monad.Trans.RWS.StrictwithRWSTmapRWSTexecRWSTevalRWSTwithRWSmapRWSexecRWSevalRWSrunRWSrwsRWSrunRWSTRWSTControl.Monad.Trans.RWS.LazyControl.Monad.Trans.Reader withReaderT mapReaderT withReader mapReader runReaderReader runReaderTReaderTControl.Monad.Trans.ListmapListTrunListTListTControl.Monad.Trans.Error mapErrorTstrMsgnoMsg runErrorTErrorTControl.Monad.Trans.Cont withContTmapContTwithContmapContrunContcontContrunContTContT MonadWriterwritertelllistenpasslistenscensor MonadStategetputstatemodifygets MonadReaderasklocalreaderasksMonadRWS MonadError MonadContcallCCbase Control.MonadliftM$fMonadWriterwStateT$fMonadWriterwStateT0$fMonadWriterwReaderT$fMonadWriterwMaybeT$fMonadWriterwIdentityT$fMonadWriterwErrorT$fMonadWriterwRWST$fMonadWriterwRWST0$fMonadWriterwWriterT$fMonadWriterwWriterT0$fMonadStatesWriterT$fMonadStatesWriterT0$fMonadStatesReaderT$fMonadStatesMaybeT$fMonadStatesListT$fMonadStatesIdentityT$fMonadStatesErrorT$fMonadStatesContT$fMonadStatesRWST$fMonadStatesRWST0$fMonadStatesStateT$fMonadStatesStateT0$fMonadReaderrWriterT$fMonadReaderrWriterT0$fMonadReaderrStateT$fMonadReaderrStateT0$fMonadReaderrMaybeT$fMonadReaderrListT$fMonadReaderrIdentityT$fMonadReaderrErrorT$fMonadReaderr'ContT$fMonadReaderrRWST$fMonadReaderrRWST0$fMonadReaderrReaderT$fMonadReaderr(->)$fMonadRWSrwsMaybeT$fMonadRWSrwsIdentityT$fMonadRWSrwsErrorT$fMonadRWSrwsRWST$fMonadRWSrwsRWST0GHC.Basefail>>=>>fmapreturnControl.Monad.FixmfixguardMonadFunctorMonadFix MonadPlus Data.FunctionfixmfilterapliftM5liftM4liftM3liftM2unlesswhen replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMjoinvoidforever<=<>=>msumforM_forMfilterMmapM_mapM sequence_sequence=<<mplusmzeroData.Functor.Identity runIdentityIdentity Data.EitherStringGHC.IO.ExceptionIOError$fMonadErroreWriterT$fMonadErroreWriterT0$fMonadErroreStateT$fMonadErroreStateT0$fMonadErroreRWST$fMonadErroreRWST0$fMonadErroreReaderT$fMonadErroreMaybeT$fMonadErroreListT$fMonadErroreIdentityT$fMonadErroreErrorT$fMonadErroreEither$fMonadErrorIOExceptionIO$fMonadContWriterT$fMonadContWriterT0$fMonadContStateT$fMonadContStateT0$fMonadContRWST$fMonadContRWST0$fMonadContReaderT$fMonadContMaybeT$fMonadContListT$fMonadContIdentityT$fMonadContErrorT$fMonadContContTControl.Monad.IO.ClassliftIOMonadIOControl.Monad.Trans.Classlift MonadTrans Data.Monoid<>mconcatmappendmemptyMonoidgetDualDualappEndoEndogetAllAllgetAnyAnygetSumSum getProductProductgetFirstFirstgetLastLast