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

Safe HaskellSafe-Inferred
LanguageHaskell98

Generics.Deriving.Foldable

Contents

Synopsis

Foldable class

class GFoldable t where Source

Minimal complete definition

Nothing

Methods

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

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

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

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

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

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

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

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

Instances

Default method

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

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 -> Bool Source

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

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

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

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

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

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

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

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

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

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