[Haskell-cafe] ANNOUNCE: monad-control-0.3
Joey Hess
joey at kitenet.net
Tue Dec 6 16:37:50 CET 2011
Bas van Dijk wrote:
> 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
Aha! Thanks again.
--
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111206/4f808e55/attachment.pgp>
More information about the Haskell-Cafe
mailing list