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

Safe HaskellSafe
LanguageHaskell2010

Generics.Deriving.Foldable

Contents

Synopsis

Generic Foldable class

class GFoldable t where Source #

Minimal complete definition

Nothing

Methods

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

gfoldMap :: (Generic1 t, GFoldable' (Rep1 t), 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
GFoldable [] Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> [a] -> m Source #

gfold :: Monoid m => [m] -> m Source #

gfoldr :: (a -> b -> b) -> b -> [a] -> b Source #

gfoldr' :: (a -> b -> b) -> b -> [a] -> b Source #

gfoldl :: (a -> b -> a) -> a -> [b] -> a Source #

gfoldl' :: (a -> b -> a) -> a -> [b] -> a Source #

gfoldr1 :: (a -> a -> a) -> [a] -> a Source #

gfoldl1 :: (a -> a -> a) -> [a] -> a Source #

GFoldable Maybe Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Maybe a -> m Source #

gfold :: Monoid m => Maybe m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Maybe a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Maybe a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Maybe b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Maybe b -> a Source #

gfoldr1 :: (a -> a -> a) -> Maybe a -> a Source #

gfoldl1 :: (a -> a -> a) -> Maybe a -> a Source #

GFoldable Complex Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Complex a -> m Source #

gfold :: Monoid m => Complex m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Complex a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Complex a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Complex b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Complex b -> a Source #

gfoldr1 :: (a -> a -> a) -> Complex a -> a Source #

gfoldl1 :: (a -> a -> a) -> Complex a -> a Source #

GFoldable Min Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Min a -> m Source #

gfold :: Monoid m => Min m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Min a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Min a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Min b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Min b -> a Source #

gfoldr1 :: (a -> a -> a) -> Min a -> a Source #

gfoldl1 :: (a -> a -> a) -> Min a -> a Source #

GFoldable Max Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Max a -> m Source #

gfold :: Monoid m => Max m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Max a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Max a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Max b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Max b -> a Source #

gfoldr1 :: (a -> a -> a) -> Max a -> a Source #

gfoldl1 :: (a -> a -> a) -> Max a -> a Source #

GFoldable First Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> First a -> m Source #

gfold :: Monoid m => First m -> m Source #

gfoldr :: (a -> b -> b) -> b -> First a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> First a -> b Source #

gfoldl :: (a -> b -> a) -> a -> First b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> First b -> a Source #

gfoldr1 :: (a -> a -> a) -> First a -> a Source #

gfoldl1 :: (a -> a -> a) -> First a -> a Source #

GFoldable Last Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Last a -> m Source #

gfold :: Monoid m => Last m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Last a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Last a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Last b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Last b -> a Source #

gfoldr1 :: (a -> a -> a) -> Last a -> a Source #

gfoldl1 :: (a -> a -> a) -> Last a -> a Source #

GFoldable WrappedMonoid Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> WrappedMonoid a -> m Source #

gfold :: Monoid m => WrappedMonoid m -> m Source #

gfoldr :: (a -> b -> b) -> b -> WrappedMonoid a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> WrappedMonoid a -> b Source #

gfoldl :: (a -> b -> a) -> a -> WrappedMonoid b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> WrappedMonoid b -> a Source #

gfoldr1 :: (a -> a -> a) -> WrappedMonoid a -> a Source #

gfoldl1 :: (a -> a -> a) -> WrappedMonoid a -> a Source #

GFoldable Option Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Option a -> m Source #

gfold :: Monoid m => Option m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Option a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Option a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Option b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Option b -> a Source #

gfoldr1 :: (a -> a -> a) -> Option a -> a Source #

gfoldl1 :: (a -> a -> a) -> Option a -> a Source #

GFoldable ZipList Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> ZipList a -> m Source #

gfold :: Monoid m => ZipList m -> m Source #

gfoldr :: (a -> b -> b) -> b -> ZipList a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> ZipList a -> b Source #

gfoldl :: (a -> b -> a) -> a -> ZipList b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> ZipList b -> a Source #

gfoldr1 :: (a -> a -> a) -> ZipList a -> a Source #

gfoldl1 :: (a -> a -> a) -> ZipList a -> a Source #

GFoldable Identity Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Identity a -> m Source #

gfold :: Monoid m => Identity m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Identity a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Identity a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Identity b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Identity b -> a Source #

gfoldr1 :: (a -> a -> a) -> Identity a -> a Source #

gfoldl1 :: (a -> a -> a) -> Identity a -> a Source #

GFoldable First Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> First a -> m Source #

gfold :: Monoid m => First m -> m Source #

gfoldr :: (a -> b -> b) -> b -> First a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> First a -> b Source #

gfoldl :: (a -> b -> a) -> a -> First b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> First b -> a Source #

gfoldr1 :: (a -> a -> a) -> First a -> a Source #

gfoldl1 :: (a -> a -> a) -> First a -> a Source #

GFoldable Last Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Last a -> m Source #

gfold :: Monoid m => Last m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Last a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Last a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Last b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Last b -> a Source #

gfoldr1 :: (a -> a -> a) -> Last a -> a Source #

gfoldl1 :: (a -> a -> a) -> Last a -> a Source #

GFoldable Dual Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Dual a -> m Source #

gfold :: Monoid m => Dual m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Dual a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Dual a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Dual b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Dual b -> a Source #

gfoldr1 :: (a -> a -> a) -> Dual a -> a Source #

gfoldl1 :: (a -> a -> a) -> Dual a -> a Source #

GFoldable Sum Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Sum a -> m Source #

gfold :: Monoid m => Sum m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Sum a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Sum a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Sum b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Sum b -> a Source #

gfoldr1 :: (a -> a -> a) -> Sum a -> a Source #

gfoldl1 :: (a -> a -> a) -> Sum a -> a Source #

GFoldable Product Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Product a -> m Source #

gfold :: Monoid m => Product m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Product a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Product a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Product b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Product b -> a Source #

gfoldr1 :: (a -> a -> a) -> Product a -> a Source #

gfoldl1 :: (a -> a -> a) -> Product a -> a Source #

GFoldable Down Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Down a -> m Source #

gfold :: Monoid m => Down m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Down a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Down a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Down b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Down b -> a Source #

gfoldr1 :: (a -> a -> a) -> Down a -> a Source #

gfoldl1 :: (a -> a -> a) -> Down a -> a Source #

GFoldable NonEmpty Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> NonEmpty a -> m Source #

gfold :: Monoid m => NonEmpty m -> m Source #

gfoldr :: (a -> b -> b) -> b -> NonEmpty a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> NonEmpty a -> b Source #

gfoldl :: (a -> b -> a) -> a -> NonEmpty b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> NonEmpty b -> a Source #

gfoldr1 :: (a -> a -> a) -> NonEmpty a -> a Source #

gfoldl1 :: (a -> a -> a) -> NonEmpty a -> a Source #

GFoldable (Either a) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m Source #

gfold :: Monoid m => Either a m -> m Source #

gfoldr :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

gfoldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

gfoldl :: (a0 -> b -> a0) -> a0 -> Either a b -> a0 Source #

gfoldl' :: (a0 -> b -> a0) -> a0 -> Either a b -> a0 Source #

gfoldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

gfoldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

GFoldable ((,) a) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a0 -> m) -> (a, a0) -> m Source #

gfold :: Monoid m => (a, m) -> m Source #

gfoldr :: (a0 -> b -> b) -> b -> (a, a0) -> b Source #

gfoldr' :: (a0 -> b -> b) -> b -> (a, a0) -> b Source #

gfoldl :: (a0 -> b -> a0) -> a0 -> (a, b) -> a0 Source #

gfoldl' :: (a0 -> b -> a0) -> a0 -> (a, b) -> a0 Source #

gfoldr1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

gfoldl1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

GFoldable (Arg a) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m Source #

gfold :: Monoid m => Arg a m -> m Source #

gfoldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b Source #

gfoldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b Source #

gfoldl :: (a0 -> b -> a0) -> a0 -> Arg a b -> a0 Source #

gfoldl' :: (a0 -> b -> a0) -> a0 -> Arg a b -> a0 Source #

gfoldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 Source #

gfoldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 Source #

GFoldable (Proxy :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Proxy a -> m Source #

gfold :: Monoid m => Proxy m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Proxy a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Proxy a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Proxy b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Proxy b -> a Source #

gfoldr1 :: (a -> a -> a) -> Proxy a -> a Source #

gfoldl1 :: (a -> a -> a) -> Proxy a -> a Source #

(Generic1 t, GFoldable' (Rep1 t)) => GFoldable (Default1 t) Source # 
Instance details

Defined in Generics.Deriving.Default

Methods

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

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

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

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

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

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

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

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

GFoldable (Const m :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 Source #

gfold :: Monoid m0 => Const m m0 -> m0 Source #

gfoldr :: (a -> b -> b) -> b -> Const m a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Const m a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Const m b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Const m b -> a Source #

gfoldr1 :: (a -> a -> a) -> Const m a -> a Source #

gfoldl1 :: (a -> a -> a) -> Const m a -> a Source #

(GFoldable f, GFoldable g) => GFoldable (Product f g) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Product f g a -> m Source #

gfold :: Monoid m => Product f g m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Product f g a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Product f g a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Product f g b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Product f g b -> a Source #

gfoldr1 :: (a -> a -> a) -> Product f g a -> a Source #

gfoldl1 :: (a -> a -> a) -> Product f g a -> a Source #

(GFoldable f, GFoldable g) => GFoldable (Sum f g) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap :: Monoid m => (a -> m) -> Sum f g a -> m Source #

gfold :: Monoid m => Sum f g m -> m Source #

gfoldr :: (a -> b -> b) -> b -> Sum f g a -> b Source #

gfoldr' :: (a -> b -> b) -> b -> Sum f g a -> b Source #

gfoldl :: (a -> b -> a) -> a -> Sum f g b -> a Source #

gfoldl' :: (a -> b -> a) -> a -> Sum f g b -> a Source #

gfoldr1 :: (a -> a -> a) -> Sum f g a -> a Source #

gfoldl1 :: (a -> a -> a) -> Sum f g a -> a Source #

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 #

gor :: GFoldable t => t Bool -> Bool 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 #

Internal Foldable class

class GFoldable' t where Source #

Methods

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

Instances
GFoldable' Par1 Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> Par1 a -> m Source #

GFoldable' (V1 :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> V1 a -> m Source #

GFoldable' (U1 :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> U1 a -> m Source #

GFoldable' (UAddr :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> UAddr a -> m Source #

GFoldable' (UChar :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> UChar a -> m Source #

GFoldable' (UDouble :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> UDouble a -> m Source #

GFoldable' (UFloat :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> UFloat a -> m Source #

GFoldable' (UInt :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> UInt a -> m Source #

GFoldable' (UWord :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> UWord a -> m Source #

GFoldable f => GFoldable' (Rec1 f) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> Rec1 f a -> m Source #

GFoldable' (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> K1 i c a -> m Source #

(GFoldable' f, GFoldable' g) => GFoldable' (f :+: g) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> (f :+: g) a -> m Source #

(GFoldable' f, GFoldable' g) => GFoldable' (f :*: g) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m Source #

GFoldable' f => GFoldable' (M1 i c f) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> M1 i c f a -> m Source #

(GFoldable f, GFoldable' g) => GFoldable' (f :.: g) Source # 
Instance details

Defined in Generics.Deriving.Foldable

Methods

gfoldMap' :: Monoid m => (a -> m) -> (f :.: g) a -> m Source #