Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Free FMonad
Synopsis
- data FFree ff g x
- fffmap :: forall ff gg h. (FFunctor ff, FFunctor gg, Functor h) => (forall h'. Functor h' => ff h' ~> gg h') -> FFree ff h ~> FFree gg h
- iter :: forall ff g. (FFunctor ff, Functor g) => (ff g ~> g) -> FFree ff g ~> g
- foldFFree :: forall ff mm g. (FFunctor ff, FMonad mm, Functor g) => (forall h. Functor h => ff h ~> mm h) -> FFree ff g ~> mm g
- retract :: (FMonad ff, Functor g) => FFree ff g ~> ff g
- liftF :: (FFunctor ff, Functor g) => ff g ~> FFree ff g
Documentation
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 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 # | |
(FStrong ff, Applicative g) => Applicative (FFree ff g) Source # | |
(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 gg h. (FFunctor ff, FFunctor gg, Functor h) => (forall h'. Functor h' => ff h' ~> gg h') -> FFree ff h ~> FFree gg h Source #
iter :: forall ff g. (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
.