Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- class GenericFoldMap tag where
- type GenericFoldMapM tag :: Type
- type GenericFoldMapC tag a :: Constraint
- genericFoldMapF :: GenericFoldMapC tag a => a -> GenericFoldMapM tag
- class GFoldMapC tag f where
- gFoldMapC :: f p -> GenericFoldMapM tag
Documentation
class GenericFoldMap tag where Source #
Implementation enumeration type class for generic foldMap
.
The type variable is uninstantiated, used purely as a tag.
Avoid orphan instances by defining custom empty types to use here. See the binrep library on Hackage for an example.
type GenericFoldMapM tag :: Type Source #
type GenericFoldMapC tag a :: Constraint Source #
The type class providing the map function in foldMap
for permitted
types.
genericFoldMapF :: GenericFoldMapC tag a => a -> GenericFoldMapM tag Source #
The map function in foldMap
(first argument).
Instances
GenericFoldMap Showly Source # | |
Defined in Generic.Data.Function.Example type GenericFoldMapM Showly Source # type GenericFoldMapC Showly a Source # genericFoldMapF :: GenericFoldMapC Showly a => a -> GenericFoldMapM Showly Source # | |
Monoid m => GenericFoldMap (EmptyRec0 m :: Type) Source # | |
Defined in Generic.Data.Function.FoldMap.Constructor type GenericFoldMapM (EmptyRec0 m) Source # type GenericFoldMapC (EmptyRec0 m) a Source # genericFoldMapF :: GenericFoldMapC (EmptyRec0 m) a => a -> GenericFoldMapM (EmptyRec0 m) Source # | |
GenericFoldMap (NoRec0 m :: Type) Source # |
|
Defined in Generic.Data.Function.FoldMap.Constructor type GenericFoldMapM (NoRec0 m) Source # type GenericFoldMapC (NoRec0 m) a Source # genericFoldMapF :: GenericFoldMapC (NoRec0 m) a => a -> GenericFoldMapM (NoRec0 m) Source # |
class GFoldMapC tag f where Source #
foldMap
on individual constructors (products).
gFoldMapC :: f p -> GenericFoldMapM tag Source #
Instances
Monoid (GenericFoldMapM tag) => GFoldMapC (tag :: k1) (U1 :: k2 -> Type) Source # | Wow, look! Nothing! |
Defined in Generic.Data.Function.FoldMap.Constructor gFoldMapC :: forall (p :: k10). U1 p -> GenericFoldMapM tag Source # | |
(Semigroup (GenericFoldMapM tag), GFoldMapC tag l, GFoldMapC tag r) => GFoldMapC (tag :: k1) (l :*: r :: k2 -> Type) Source # |
|
Defined in Generic.Data.Function.FoldMap.Constructor gFoldMapC :: forall (p :: k10). (l :*: r) p -> GenericFoldMapM tag Source # | |
(GenericFoldMap tag, GenericFoldMapC tag a) => GFoldMapC (tag :: k1) (S1 c (Rec0 a) :: k2 -> Type) Source # | |
Defined in Generic.Data.Function.FoldMap.Constructor |