mirror of
https://github.com/ilyakooo0/semi-iso-optics.git
synced 2024-10-26 08:19:54 +03:00
Add SIMonadTrans.
This commit is contained in:
parent
a7986cc969
commit
68eee5e258
23
Control/SemiIso/Trans.hs
Normal file
23
Control/SemiIso/Trans.hs
Normal 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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user