Safe Haskell | None |
---|---|
Language | Haskell2010 |
FMonad.FFree
Description
Free FMonad
Synopsis
- data FFree (ff :: (Type -> Type) -> Type -> Type) (g :: Type -> Type) x
- fffmap :: forall (ff :: FF) (gg :: FF) (h :: Type -> Type). (FFunctor ff, FFunctor gg, Functor h) => (forall (h' :: Type -> Type). Functor h' => ff h' ~> gg h') -> FFree ff h ~> FFree gg h
- iter :: forall (ff :: FF) (g :: Type -> Type). (FFunctor ff, Functor g) => (ff g ~> g) -> FFree ff g ~> g
- foldFFree :: forall (ff :: FF) (mm :: FF) (g :: Type -> Type). (FFunctor ff, FMonad mm, Functor g) => (forall (h :: Type -> Type). Functor h => ff h ~> mm h) -> FFree ff g ~> mm g
- retract :: forall (ff :: FF) (g :: Type -> Type). (FMonad ff, Functor g) => FFree ff g ~> ff g
- liftF :: forall (ff :: FF) (g :: Type -> Type). (FFunctor ff, Functor g) => ff g ~> FFree ff g
Documentation
data FFree (ff :: (Type -> Type) -> Type -> Type) (g :: Type -> Type) x Source #
Instances
FFunctor ff => FFunctor (FFree ff) Source # | |
FFunctor ff => FMonad (FFree ff) Source # | |
FStrong ff => FStrong (FFree ff) Source # | |
(Foldable g, Foldable (ff (FFree ff g))) => Foldable (FFree ff g) Source # | |
Defined in FMonad.FFree Methods fold :: Monoid m => FFree ff g m -> m # foldMap :: Monoid m => (a -> m) -> FFree ff g a -> m # foldMap' :: Monoid m => (a -> m) -> FFree ff g a -> m # foldr :: (a -> b -> b) -> b -> FFree ff g a -> b # foldr' :: (a -> b -> b) -> b -> FFree ff g a -> b # foldl :: (b -> a -> b) -> b -> FFree ff g a -> b # foldl' :: (b -> a -> b) -> b -> FFree ff g a -> b # foldr1 :: (a -> a -> a) -> FFree ff g a -> a # foldl1 :: (a -> a -> a) -> FFree ff g a -> a # toList :: FFree ff g a -> [a] # null :: FFree ff g a -> Bool # length :: FFree ff g a -> Int # elem :: Eq a => a -> FFree ff g a -> Bool # maximum :: Ord a => FFree ff g a -> a # minimum :: Ord a => FFree ff g a -> a # | |
(Traversable g, Traversable (ff (FFree ff g))) => Traversable (FFree ff g) Source # | |
Defined in FMonad.FFree | |
(FStrong ff, Applicative g) => Applicative (FFree ff g) Source # | |
Defined in FMonad.FFree | |
(Functor g, Functor (ff (FFree ff g))) => Functor (FFree ff g) Source # | |
(Show (g a), Show (ff (FFree ff g) a)) => Show (FFree ff g a) Source # | |
(Eq (g a), Eq (ff (FFree ff g) a)) => Eq (FFree ff g a) Source # | |
(Ord (g a), Ord (ff (FFree ff g) a)) => Ord (FFree ff g a) Source # | |
Defined in FMonad.FFree |
fffmap :: forall (ff :: FF) (gg :: FF) (h :: Type -> Type). (FFunctor ff, FFunctor gg, Functor h) => (forall (h' :: Type -> Type). Functor h' => ff h' ~> gg h') -> FFree ff h ~> FFree gg h Source #
iter :: forall (ff :: FF) (g :: Type -> Type). (FFunctor ff, Functor g) => (ff g ~> g) -> FFree ff g ~> g Source #
Iteratively fold a FFree
term down, given a way to fold one layer of ff
.
foldFFree :: forall (ff :: FF) (mm :: FF) (g :: Type -> Type). (FFunctor ff, FMonad mm, Functor g) => (forall (h :: Type -> Type). Functor h => ff h ~> mm h) -> FFree ff g ~> mm g Source #
Fold a FFree
term to another FMonad mm
.