Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module exposes the SieveTrans class and some Sieve transformers based on usual Reader and Writer
Synopsis
- class SieveTrans f cat | cat -> f where
- type HasKleisli = SieveTrans
- liftKleisli :: HasKleisli m eff => (a -> m b) -> eff a b
- mapKleisli :: HasKleisli m eff => ((a -> m b) -> a' -> m b') -> eff a b -> eff a' b'
- type HasKleisliIO m eff = (HasKleisli m eff, MonadIO m)
- liftKleisliIO :: HasKleisliIO m eff => (a -> IO b) -> eff a b
- type (~>) = Cayley
- type Reader r = Reader r
- type Writer w = Writer w
- fmapping :: Functor f => f t -> (t -> eff a b) -> (f ~> eff) a b
- mapCayleyEff :: Functor f => (eff a b -> eff' a' b') -> (f ~> eff) a b -> (f ~> eff') a' b'
- reading :: (t -> eff a b) -> (Reader t ~> eff) a b
- mapReader :: (t' -> eff a b -> (t, eff' a' b')) -> (Reader t ~> eff) a b -> (Reader t' ~> eff') a' b'
- mapReader_ :: (t -> eff a b -> eff' a' b') -> (Reader t ~> eff) a b -> (Reader t ~> eff') a' b'
- runReader :: t -> (Reader t ~> eff) a b -> eff a b
- writing :: w -> eff :-> (Writer w ~> eff)
- mapWriter :: (w -> eff a b -> (w', eff' a' b')) -> (Writer w ~> eff) a b -> (Writer w' ~> eff') a' b'
- mapWriter_ :: (w -> eff a b -> eff' a' b') -> (Writer w ~> eff) a b -> (Writer w ~> eff') a' b'
- runWriter :: (Writer w ~> eff) a b -> (w, eff a b)
- runWriter_ :: (Writer w ~> eff) a b -> eff a b
- swap :: (a, b) -> (b, a)
- returning :: Arrow eff => b -> eff a b
- perform :: a -> Kleisli m a b -> m b
Documentation
class SieveTrans f cat | cat -> f where Source #
A general version of Sieve
that allows mapping and recursively reaching
the sieve
liftSieve :: (a -> f b) -> cat a b Source #
mapSieve :: ((a -> f b) -> a' -> f b') -> cat a b -> cat a' b' Source #
Instances
SieveTrans m (Kleisli m) Source # | |
SieveTrans f eff => SieveTrans f (AutoIdent eff) Source # | |
SieveTrans f (Star f) Source # | |
SieveTrans f core => SieveTrans f (Rope record mantle core) Source # | |
SieveTrans f core => SieveTrans f (RopeRunner record mantle interp core) Source # | |
Defined in Control.Kernmantle.Rope.Internal liftSieve :: (a -> f b) -> RopeRunner record mantle interp core a b Source # mapSieve :: ((a -> f b) -> a' -> f b') -> RopeRunner record mantle interp core a b -> RopeRunner record mantle interp core a' b' Source # | |
(SieveTrans f cat, Applicative f) => SieveTrans f (Tannen f cat) Source # | |
(SieveTrans f cat, Applicative f') => SieveTrans f (Cayley f' cat) Source # | |
type HasKleisli = SieveTrans Source #
Just an alias
liftKleisli :: HasKleisli m eff => (a -> m b) -> eff a b Source #
Just an alias
mapKleisli :: HasKleisli m eff => ((a -> m b) -> a' -> m b') -> eff a b -> eff a' b' Source #
Just an alias
type HasKleisliIO m eff = (HasKleisli m eff, MonadIO m) Source #
liftKleisliIO :: HasKleisliIO m eff => (a -> IO b) -> eff a b Source #
When you want to lift some IO action in a Sieve of any MonadIO
mapCayleyEff :: Functor f => (eff a b -> eff' a' b') -> (f ~> eff) a b -> (f ~> eff') a' b' Source #
mapCayley in profunctors maps the functor. mapCayleyEff maps the effect in it.
mapReader :: (t' -> eff a b -> (t, eff' a' b')) -> (Reader t ~> eff) a b -> (Reader t' ~> eff') a' b' Source #
mapReader_ :: (t -> eff a b -> eff' a' b') -> (Reader t ~> eff) a b -> (Reader t ~> eff') a' b' Source #
mapWriter :: (w -> eff a b -> (w', eff' a' b')) -> (Writer w ~> eff) a b -> (Writer w' ~> eff') a' b' Source #
mapWriter_ :: (w -> eff a b -> eff' a' b') -> (Writer w ~> eff) a b -> (Writer w ~> eff') a' b' Source #
runWriter_ :: (Writer w ~> eff) a b -> eff a b Source #