Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class GFoldable t where
- gfoldMap :: Monoid m => (a -> m) -> t a -> m
- gfold :: Monoid m => t m -> m
- gfoldr :: (a -> b -> b) -> b -> t a -> b
- gfoldr' :: (a -> b -> b) -> b -> t a -> b
- gfoldl :: (a -> b -> a) -> a -> t b -> a
- gfoldl' :: (a -> b -> a) -> a -> t b -> a
- gfoldr1 :: (a -> a -> a) -> t a -> a
- gfoldl1 :: (a -> a -> a) -> t a -> a
- 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 #
Nothing
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 # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Maybe Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Complex Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Min Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Max Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable First Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Last Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable WrappedMonoid Source # | |
Defined in Generics.Deriving.Foldable 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 ZipList Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Identity Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable First Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Last Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Dual Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Sum Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Product Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable Down Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable NonEmpty Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable (Either a) Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable ((,) a) Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable (Arg a) Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
GFoldable (Proxy :: Type -> Type) Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
(Generic1 t, GFoldable' (Rep1 t)) => GFoldable (Default1 t) Source # | |
Defined in Generics.Deriving.Default 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 # | |
GFoldable (Const m :: Type -> Type) Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
(GFoldable f, GFoldable g) => GFoldable (Product f g) Source # | |
Defined in Generics.Deriving.Foldable 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 # | |
(GFoldable f, GFoldable g) => GFoldable (Sum f g) Source # | |
Defined in Generics.Deriving.Foldable 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 # |
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 #
Instances
GFoldable' Par1 Source # | |
GFoldable' (V1 :: Type -> Type) Source # | |
GFoldable' (U1 :: Type -> Type) Source # | |
GFoldable' (UAddr :: Type -> Type) Source # | |
GFoldable' (UChar :: Type -> Type) Source # | |
GFoldable' (UDouble :: Type -> Type) Source # | |
GFoldable' (UFloat :: Type -> Type) Source # | |
GFoldable' (UInt :: Type -> Type) Source # | |
GFoldable' (UWord :: Type -> Type) Source # | |
GFoldable f => GFoldable' (Rec1 f) Source # | |
GFoldable' (K1 i c :: Type -> Type) 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 # | |