Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- class GenericContra tag where
- type GenericContraF tag :: Type -> Type
- type GenericContraC tag a :: Constraint
- genericContraF :: (GenericContraC tag a, Divisible (GenericContraF tag)) => GenericContraF tag a
- genericContraNonSum :: forall {cd} {gf} asserts tag a. (Generic a, Rep a ~ D1 cd gf, GContraNonSum tag gf, ApplyGCAsserts asserts gf, Contravariant (GenericContraF tag)) => GenericContraF tag a
- class GContraNonSum tag gf
- genericContraSum :: forall {cd} {gf} opts asserts tag a. (Generic a, Rep a ~ D1 cd gf, GContraSum opts tag gf, ApplyGCAsserts asserts gf, Contravariant (GenericContraF tag)) => GenericContraF tag String -> GenericContraF tag a
- class GContraSum (opts :: SumOpts) tag gf
Documentation
class GenericContra tag where Source #
type GenericContraF tag :: Type -> Type Source #
type GenericContraC tag a :: Constraint Source #
genericContraF :: (GenericContraC tag a, Divisible (GenericContraF tag)) => GenericContraF tag a Source #
Instances
GenericContra (EmptyRec0 f :: Type) Source # | over types where all fields map to |
Defined in Generic.Data.Function.Contra.Constructor type GenericContraF (EmptyRec0 f) :: Type -> Type Source # type GenericContraC (EmptyRec0 f) a Source # genericContraF :: (GenericContraC (EmptyRec0 f) a, Divisible (GenericContraF (EmptyRec0 f))) => GenericContraF (EmptyRec0 f) a Source # | |
GenericContra (NoRec0 f :: Type) Source # | over types with no fields in any constructor |
Defined in Generic.Data.Function.Contra.Constructor type GenericContraF (NoRec0 f) :: Type -> Type Source # type GenericContraC (NoRec0 f) a Source # genericContraF :: (GenericContraC (NoRec0 f) a, Divisible (GenericContraF (NoRec0 f))) => GenericContraF (NoRec0 f) a Source # |
genericContraNonSum :: forall {cd} {gf} asserts tag a. (Generic a, Rep a ~ D1 cd gf, GContraNonSum tag gf, ApplyGCAsserts asserts gf, Contravariant (GenericContraF tag)) => GenericContraF tag a Source #
Generic contra over a term of non-sum data type a
.
a
must have exactly one constructor.
class GContraNonSum tag gf Source #
Instances
GContraNonSum (tag :: k1) (V1 :: k2 -> Type) Source # | |
Defined in Generic.Data.Function.Contra.NonSum gContraNonSum :: forall (p :: k10). GenericContraF tag (V1 p) Source # | |
GContraNonSum (tag :: k1) (l :+: r :: k2 -> Type) Source # | |
Defined in Generic.Data.Function.Contra.NonSum gContraNonSum :: forall (p :: k10). GenericContraF tag ((l :+: r) p) Source # | |
(Contravariant (GenericContraF tag), GContraC tag g) => GContraNonSum (tag :: k1) (C1 c g :: k2 -> Type) Source # | |
Defined in Generic.Data.Function.Contra.NonSum gContraNonSum :: forall (p :: k10). GenericContraF tag (C1 c g p) Source # |
genericContraSum :: forall {cd} {gf} opts asserts tag a. (Generic a, Rep a ~ D1 cd gf, GContraSum opts tag gf, ApplyGCAsserts asserts gf, Contravariant (GenericContraF tag)) => GenericContraF tag String -> GenericContraF tag a Source #
Generic contra over a term of sum data type a
.
You must provide a contra function for constructor names.
This is the most generic option, but depending on your string manipulation may be slower.
class GContraSum (opts :: SumOpts) tag gf Source #
Instances
GContraSum opts (tag :: k1) (V1 :: k2 -> Type) Source # | |
Defined in Generic.Data.Function.Contra.Sum gContraSum :: forall (p :: k10). GenericContraF tag String -> GenericContraF tag (V1 p) Source # | |
GContraCSum tag (C1 c g) => GContraSum 'AllowSingletonSum (tag :: k1) (C1 c g :: k2 -> Type) Source # | |
Defined in Generic.Data.Function.Contra.Sum gContraSum :: forall (p :: k10). GenericContraF tag String -> GenericContraF tag (C1 c g p) Source # | |
GContraSum 'SumOnly (tag :: k1) (C1 c g :: k2 -> Type) Source # | |
Defined in Generic.Data.Function.Contra.Sum gContraSum :: forall (p :: k10). GenericContraF tag String -> GenericContraF tag (C1 c g p) Source # | |
GContraCSum tag (l :+: r) => GContraSum opts (tag :: k1) (l :+: r :: k2 -> Type) Source # | |
Defined in Generic.Data.Function.Contra.Sum gContraSum :: forall (p :: k10). GenericContraF tag String -> GenericContraF tag ((l :+: r) p) Source # |