Free.AlaCarte
data (f :+: g) e infixr 8 Source #
Constructors
Defined in Free.AlaCarte
Methods
inj :: f a -> (f :+: g) a Source #
prj :: (f :+: g) a -> Maybe (f a) Source #
inj :: f a -> (h :+: g) a Source #
prj :: (h :+: g) a -> Maybe (f a) Source #
fmap :: (a -> b) -> (f :+: g) a -> (f :+: g) b #
(<$) :: a -> (f :+: g) b -> (f :+: g) a #
execAlgebra :: (f :+: g) (IO a) -> IO a Source #
class (Functor sub, Functor sup) => sub :<: sup where Source #
inj :: sub a -> sup a Source #
prj :: sup a -> Maybe (sub a) Source #
inj :: f a -> f a Source #
prj :: f a -> Maybe (f a) Source #
data Free f a Source #
pure :: a -> Free f a #
(<*>) :: Free f (a -> b) -> Free f a -> Free f b #
liftA2 :: (a -> b -> c) -> Free f a -> Free f b -> Free f c #
(*>) :: Free f a -> Free f b -> Free f b #
(<*) :: Free f a -> Free f b -> Free f a #
fmap :: (a -> b) -> Free f a -> Free f b #
(<$) :: a -> Free f b -> Free f a #
(>>=) :: Free f a -> (a -> Free f b) -> Free f b #
(>>) :: Free f a -> Free f b -> Free f b #
return :: a -> Free f a #
foldFree :: forall f a b. Functor f => (a -> b) -> (f b -> b) -> Free f a -> b Source #
exec :: Exec f => Free f a -> IO a Source #
class Functor f => Exec f where Source #
execAlgebra :: f (IO a) -> IO a Source #
injectFree :: g :<: f => g (Free f a) -> Free f a Source #