generic-deriving-1.6.2: Generic programming library for generalised deriving.

Safe HaskellSafe-Inferred

Generics.Deriving.Foldable

Contents

Synopsis

Foldable class

class GFoldable t whereSource

Methods

gfoldMap :: Monoid m => (a -> m) -> t a -> mSource

gfold :: Monoid m => t m -> mSource

gfoldr :: (a -> b -> b) -> b -> t a -> bSource

gfoldr' :: (a -> b -> b) -> b -> t a -> bSource

gfoldl :: (a -> b -> a) -> a -> t b -> aSource

gfoldl' :: (a -> b -> a) -> a -> t b -> aSource

gfoldr1 :: (a -> a -> a) -> t a -> aSource

gfoldl1 :: (a -> a -> a) -> t a -> aSource

Instances

Default method

gfoldMapdefault :: (Generic1 t, GFoldable' (Rep1 t), Monoid m) => (a -> m) -> t a -> mSource

Derived functions

gtoList :: GFoldable t => t a -> [a]Source

gconcat :: GFoldable t => t [a] -> [a]Source

gconcatMap :: GFoldable t => (a -> [b]) -> t a -> [b]Source

gany :: GFoldable t => (a -> Bool) -> t a -> BoolSource

gall :: GFoldable t => (a -> Bool) -> t a -> BoolSource

gsum :: (GFoldable t, Num a) => t a -> aSource

gproduct :: (GFoldable t, Num a) => t a -> aSource

gmaximum :: (GFoldable t, Ord a) => t a -> aSource

gmaximumBy :: GFoldable t => (a -> a -> Ordering) -> t a -> aSource

gminimum :: (GFoldable t, Ord a) => t a -> aSource

gminimumBy :: GFoldable t => (a -> a -> Ordering) -> t a -> aSource

gelem :: (GFoldable t, Eq a) => a -> t a -> BoolSource

gnotElem :: (GFoldable t, Eq a) => a -> t a -> BoolSource

gfind :: GFoldable t => (a -> Bool) -> t a -> Maybe aSource