Add SIMonadTrans.

This commit is contained in:
Paweł Nowak 2014-11-25 22:39:16 +01:00
parent a7986cc969
commit 68eee5e258
2 changed files with 24 additions and 0 deletions

23
Control/SemiIso/Trans.hs Normal file
View File

@ -0,0 +1,23 @@
{- |
Module : Control.SemiIso.Trans
Description : SemiIsoMonad transformers.
Copyright : (c) Paweł Nowak
License : MIT
Maintainer : Paweł Nowak <pawel834@gmail.com>
Stability : experimental
Monad transformers for the SemiIso hierarchy.
-}
module Control.SemiIso.Trans where
import Data.SemiIsoFunctor
-- | Monad transformer. Should satisfy laws:
--
-- prop> silift . sipure = sipure
--
-- prop> silift (m //= f) = silift m //= (silift . f)
class SIMonadTrans t where
-- | Lifts a computation from the base monad.
silift :: SemiIsoMonad m => m a -> t m a

View File

@ -22,6 +22,7 @@ source-repository head
library
exposed-modules: Control.Lens.SemiIso
Control.Lens.Internal.SemiIso
Control.SemiIso.Trans
Data.SemiIsoFunctor
Data.Profunctor.Exposed
build-depends: base >= 4 && < 5, profunctors, transformers, lens, tuple-morph