| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Generics.Deriving.Foldable
- class GFoldable t where
- gfoldMapdefault :: (Generic1 t, GFoldable' (Rep1 t), Monoid m) => (a -> m) -> t a -> m
- gtoList :: GFoldable t => t a -> [a]
- gconcat :: GFoldable t => t [a] -> [a]
- gconcatMap :: GFoldable t => (a -> [b]) -> t a -> [b]
- gand :: GFoldable t => t Bool -> Bool
- gor :: GFoldable t => t Bool -> Bool
- gany :: GFoldable t => (a -> Bool) -> t a -> Bool
- gall :: GFoldable t => (a -> Bool) -> t a -> Bool
- gsum :: (GFoldable t, Num a) => t a -> a
- gproduct :: (GFoldable t, Num a) => t a -> a
- gmaximum :: (GFoldable t, Ord a) => t a -> a
- gmaximumBy :: GFoldable t => (a -> a -> Ordering) -> t a -> a
- gminimum :: (GFoldable t, Ord a) => t a -> a
- gminimumBy :: GFoldable t => (a -> a -> Ordering) -> t a -> a
- gelem :: (GFoldable t, Eq a) => a -> t a -> Bool
- gnotElem :: (GFoldable t, Eq a) => a -> t a -> Bool
- gfind :: GFoldable t => (a -> Bool) -> t a -> Maybe a
- class GFoldable' t where
Generic Foldable class
class GFoldable t where Source #
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 #
Instances
| GFoldable [] Source # | |
| GFoldable Maybe Source # | |
| GFoldable Complex Source # | |
| GFoldable Min Source # | |
| GFoldable Max Source # | |
| GFoldable First Source # | |
| GFoldable Last Source # | |
| GFoldable WrappedMonoid Source # | |
| GFoldable Option Source # | |
| GFoldable NonEmpty Source # | |
| GFoldable ZipList Source # | |
| GFoldable Identity Source # | |
| GFoldable Dual Source # | |
| GFoldable Sum Source # | |
| GFoldable Product Source # | |
| GFoldable First Source # | |
| GFoldable Last Source # | |
| GFoldable Down Source # | |
| GFoldable (Either a) Source # | |
| GFoldable ((,) a) Source # | |
| GFoldable (Arg a) Source # | |
| GFoldable (Proxy *) Source # | |
| GFoldable (Const * m) Source # | |
| (GFoldable f, GFoldable g) => GFoldable (Product * f g) Source # | |
| (GFoldable f, GFoldable g) => GFoldable (Sum * f g) Source # | |
Default method
gfoldMapdefault :: (Generic1 t, GFoldable' (Rep1 t), Monoid m) => (a -> m) -> t a -> m Source #
Derived functions
gconcatMap :: GFoldable t => (a -> [b]) -> t a -> [b] Source #
gmaximumBy :: GFoldable t => (a -> a -> Ordering) -> t a -> a Source #
gminimumBy :: GFoldable t => (a -> a -> Ordering) -> t a -> a Source #
Internal Foldable class
class GFoldable' t where Source #
Minimal complete definition
Instances
| GFoldable' Par1 Source # | |
| GFoldable' (V1 *) Source # | |
| GFoldable' (U1 *) Source # | |
| GFoldable' (UAddr *) Source # | |
| GFoldable' (UChar *) Source # | |
| GFoldable' (UDouble *) Source # | |
| GFoldable' (UFloat *) Source # | |
| GFoldable' (UInt *) Source # | |
| GFoldable' (UWord *) Source # | |
| GFoldable f => GFoldable' (Rec1 * f) Source # | |
| GFoldable' (K1 * i c) Source # | |
| (GFoldable' f, GFoldable' g) => GFoldable' ((:+:) * f g) Source # | |
| (GFoldable' f, GFoldable' g) => GFoldable' ((:*:) * f g) Source # | |
| GFoldable' f => GFoldable' (M1 * i c f) Source # | |
| (GFoldable f, GFoldable' g) => GFoldable' ((:.:) * * f g) Source # | |