Copyright | (c) 2011 Patrick Bahr |
---|---|

License | BSD3 |

Maintainer | Patrick Bahr <paba@diku.dk> |

Stability | experimental |

Portability | non-portable (GHC Extensions) |

Safe Haskell | Safe |

Language | Haskell98 |

This module defines higher-order foldable functors.

# Documentation

class HFunctor h => HFoldable h where Source #

hfold :: Monoid m => h (K m) :=> m Source #

hfoldMap :: Monoid m => (a :=> m) -> h a :=> m Source #

hfoldr :: (a :=> (b -> b)) -> b -> h a :=> b Source #

hfoldl :: (b -> a :=> b) -> b -> h a :=> b Source #

hfoldr1 :: forall a. (a -> a -> a) -> h (K a) :=> a Source #

hfoldl1 :: forall a. (a -> a -> a) -> h (K a) :=> a Source #

## Instances

HFoldable f => HFoldable (Cxt h f) Source # | |

Defined in Data.Comp.Multi.Term | |

HFoldable f => HFoldable (f :&: a) Source # | |

Defined in Data.Comp.Multi.Ops hfold :: Monoid m => (f :&: a) (K m) :=> m Source # hfoldMap :: Monoid m => (a0 :=> m) -> (f :&: a) a0 :=> m Source # hfoldr :: (a0 :=> (b -> b)) -> b -> (f :&: a) a0 :=> b Source # hfoldl :: (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 |