[Haskell-cafe] ANNOUNCE: monad-control-0.3

Bas van Dijk v.dijk.bas at gmail.com
Tue Dec 6 10:40:35 CET 2011


On 6 December 2011 09:12, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
> instance MonadBaseControl IO Annex where
>    newtype StM Annex a = StAnnex (StM (StateT AnnexState IO) a)
>    liftBaseWith f = Annex $ liftBaseWith $ \runInIO ->
>                       f $ liftM StAnnex . runInIO . runAnnex

Oops forgot the restoreM method:

   restoreM = Annex . restoreM . unStAnnex

unStAnnex (StAnnex st) = st



More information about the Haskell-Cafe mailing list