úÎ?¢<é      experimental#Bas van Dijk <v.dijk.bas@gmail.com> Trustworthy7Handy type synonym that composes the monadic states of t and m. It can be used to define the  for new  instances. A function that runs a m+ computation on the monadic state that was  captured by  A  RunInBase m4 function yields a computation in the base monad of m that  returns the monadic state of m.. This state can later be used to restore the  m computation using . Monadic state of m.  liftBaseWith is similar to liftIO and liftBase in that it 4 lifts a base computation to the constructed monad. -Instances should satisfy similar laws as the MonadIO and  laws:  &liftBaseWith . const . return = return TliftBaseWith (const (m >>= f)) = liftBaseWith (const m) >>= liftBaseWith . const . fThe difference with liftBase- is that before lifting the base computation   liftBaseWith captures the state of m. It then provides the base  computation with a  function that allows running m 7 computations in the base monad on the captured state.  Construct a m' computation from the monadic state of m that is  returned from a  function. Instances should satisfy: liftBaseWith (\*runInBase -> runInBase m) >>= restoreM = m)A function that runs a transformed monad t n on the monadic state that  was captured by   A Run t" function yields a computation in n that returns the monadic state  of t,. This state can later be used to restore a t computation using   . Monadic state of t. liftWith is similar to lift% in that it lifts a computation from . the argument monad to the constructed monad. -Instances should satisfy similar laws as the  laws:  "liftWith . const . return = return HliftWith (const (m >>= f)) = liftWith (const m) >>= liftWith . const . fThe difference with lift is that before lifting the m computation  liftWith captures the state of t. It then provides the m  computation with a  function that allows running t n computations in  n (for all n) on the captured state.  Construct a t' computation from the monadic state of t that is  returned from a  function. Instances should satisfy:  liftWith (\'run -> run t) >>= restoreT . return = t Default definition for the   method. Default defintion for the  method. Note that it composes a   of t with a  of m to  give a  of t m:   defaultLiftBaseWith stM = \f ->   $ \run -> #  $ \ runInBase -> E f $ liftM stM . runInBase . run Default definition for the  method.  Note that: defaultRestoreM unStM =   .  . unStM An often used composition:  control f =  f >>=   liftBaseOp is a particular application of  that allows % lifting control operations of type: ((a -> b c) -> b c) to: ( b m => (a -> m c) -> m c).  For example: liftBaseOp alloca ::   m => (Ptr a -> m c) -> m c liftBaseOp_ is a particular application of  that allows % lifting control operations of type:  (b a -> b a) to: ( b m => m a -> m a).  For example: liftBaseOp_ mask_ ::   m => m a -> m aliftBaseDiscard is a particular application of  that allows % lifting control operations of type:  (b () -> b a) to: ( b m => m () -> m a). *Note that, while the argument computation m () has access to the captured  state, all its side-effects in m' are discarded. It is run only for its  side-effects in the base monad b.  For example: liftBaseDiscard forkIO ::   m => m () -> m ThreadId2 Monad constructor Monad deconstructor  constructor Monad constructor  deconstructor  constructor  deconstructor  !"#$%&'()*+,-./01234    ,  !"#$%&'()*+,-./012345      !"#$%&'()*+,-./0123456789:;<=monad-control-0.3.2.1Control.Monad.Trans.Control ComposeSt RunInBaseMonadBaseControlStM liftBaseWithrestoreMRunMonadTransControlStTliftWithrestoreTdefaultLiftWithdefaultRestoreTdefaultLiftBaseWithdefaultRestoreMcontrol liftBaseOp liftBaseOp_liftBaseDiscardtransformers-base-0.4.1Control.Monad.Base MonadBasetransformers-0.3.0.0Control.Monad.Trans.Class MonadTransghc-prim GHC.TypesIO$fMonadBaseControlbRWST$fMonadBaseControlbRWST0$fMonadBaseControlbWriterT$fMonadBaseControlbWriterT0$fMonadBaseControlbErrorT$fMonadBaseControlbStateT$fMonadBaseControlbStateT0$fMonadBaseControlbReaderT$fMonadBaseControlbListT$fMonadBaseControlbMaybeT$fMonadBaseControlbIdentityT$fMonadBaseControlSTST$fMonadBaseControlSTST0$fMonadBaseControlSTMSTM"$fMonadBaseControlIdentityIdentity$fMonadBaseControl(->)(->)$fMonadBaseControl[][]$fMonadBaseControlEitherEither$fMonadBaseControlMaybeMaybe$fMonadBaseControlIOIO$fMonadTransControlRWST$fMonadTransControlRWST0$fMonadTransControlWriterT$fMonadTransControlWriterT0$fMonadTransControlStateT$fMonadTransControlStateT0$fMonadTransControlReaderT$fMonadTransControlListT$fMonadTransControlErrorT$fMonadTransControlMaybeT$fMonadTransControlIdentityT