Copyright | (c) 2011 Patrick Bahr |
---|---|
License | BSD3 |
Maintainer | Patrick Bahr <[email protected]> |
Stability | experimental |
Portability | non-portable (GHC Extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Data.Comp.Multi.HFoldable
Description
This module defines higher-order foldable functors.
Synopsis
- class HFunctor h => HFoldable (h :: (Type -> Type) -> Type -> Type) where
- hfold :: Monoid m => h (K m) :=> m
- hfoldMap :: forall m (a :: Type -> Type). Monoid m => (a :=> m) -> h a :=> m
- hfoldr :: forall (a :: Type -> Type) b. (a :=> (b -> b)) -> b -> h a :=> b
- hfoldl :: forall b (a :: Type -> Type). (b -> a :=> b) -> b -> h a :=> b
- hfoldr1 :: (a -> a -> a) -> h (K a) :=> a
- hfoldl1 :: (a -> a -> a) -> h (K a) :=> a
- kfoldr :: forall (f :: (Type -> Type) -> Type -> Type) a b. HFoldable f => (a -> b -> b) -> b -> f (K a) :=> b
- kfoldl :: forall (f :: (Type -> Type) -> Type -> Type) b a. HFoldable f => (b -> a -> b) -> b -> f (K a) :=> b
- htoList :: forall (f :: (Type -> Type) -> Type -> Type) (a :: Type -> Type). HFoldable f => f a :=> [E a]
Documentation
class HFunctor h => HFoldable (h :: (Type -> Type) -> Type -> Type) where Source #
Minimal complete definition
Nothing
Methods
hfold :: Monoid m => h (K m) :=> m Source #
hfoldMap :: forall m (a :: Type -> Type). Monoid m => (a :=> m) -> h a :=> m Source #
hfoldr :: forall (a :: Type -> Type) b. (a :=> (b -> b)) -> b -> h a :=> b Source #
hfoldl :: forall b (a :: Type -> Type). (b -> a :=> b) -> b -> h a :=> b Source #
Instances
HFoldable f => HFoldable (Cxt h f) Source # | |
Defined in Data.Comp.Multi.Term Methods hfold :: Monoid m => Cxt h f (K m) :=> m Source # hfoldMap :: forall m (a :: Type -> Type). Monoid m => (a :=> m) -> Cxt h f a :=> m Source # hfoldr :: forall (a :: Type -> Type) b. (a :=> (b -> b)) -> b -> Cxt h f a :=> b Source # hfoldl :: forall b (a :: Type -> Type). (b -> a :=> b) -> b -> Cxt h f a :=> b Source # | |
HFoldable f => HFoldable (f :&: a) Source # | |
Defined in Data.Comp.Multi.Ops Methods hfold :: Monoid m => (f :&: a) (K m) :=> m Source # hfoldMap :: forall m (a0 :: Type -> Type). Monoid m => (a0 :=> m) -> (f :&: a) a0 :=> m Source # hfoldr :: forall (a0 :: Type -> Type) b. (a0 :=> (b -> b)) -> b -> (f :&: a) a0 :=> b Source # hfoldl :: forall b (a0 :: Type -> Type). (b -> a0 :=> b) -> b -> (f :&: a) a0 :=> b Source # hfoldr1 :: (a0 -> a0 -> a0) -> (f :&: a) (K a0) :=> a0 Source # hfoldl1 :: (a0 -> a0 -> a0) -> (f :&: a) (K a0) :=> a0 Source # | |
(HFoldable f, HFoldable g) => HFoldable (f :+: g) Source # | |
Defined in Data.Comp.Multi.Ops Methods hfold :: Monoid m => (f :+: g) (K m) :=> m Source # hfoldMap :: forall m (a :: Type -> Type). Monoid m => (a :=> m) -> (f :+: g) a :=> m Source # hfoldr :: forall (a :: Type -> Type) b. (a :=> (b -> b)) -> b -> (f :+: g) a :=> b Source # hfoldl :: forall b (a :: Type -> Type). (b -> a :=> b) -> b -> (f :+: g) a :=> b Source # |
kfoldr :: forall (f :: (Type -> Type) -> Type -> Type) a b. HFoldable f => (a -> b -> b) -> b -> f (K a) :=> b Source #