kind-generics-deriving-0.3.0.0: Generic programming in GHC style for arbitrary kinds and GADTs.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Generics.Kind.Derive.KFunctor

Documentation

kfmapDefault :: forall k (f :: k) v as bs. (GenericK f, GenericK f, GFunctor (RepK f) v as bs) => Mappings v as bs -> (f :@@: as) -> f :@@: bs Source #

fmapDefault' :: forall (f :: Type -> Type) a b. (GenericK f, GenericK f, GFunctor (RepK f) '['Co] (a :&&: 'LoT0) (b :&&: 'LoT0)) => (a -> b) -> f a -> f b Source #

class GFunctor (f :: LoT k -> Type) (v :: Variances) (as :: LoT k) (bs :: LoT k) where Source #

Methods

gfmap :: Mappings v as bs -> f as -> f bs Source #

Instances

Instances details
GFunctor (U1 :: LoT k -> Type) v (as :: LoT k) (bs :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmap :: Mappings v as bs -> U1 as -> U1 bs Source #

GFunctorArg t v 'Co as bs => GFunctor (Field t :: LoT k -> Type) v (as :: LoT k) (bs :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmap :: Mappings v as bs -> Field t as -> Field t bs Source #

(GFunctor f v as bs, GFunctor g v as bs) => GFunctor (f :*: g :: LoT k -> Type) v (as :: LoT k) (bs :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmap :: Mappings v as bs -> (f :*: g) as -> (f :*: g) bs Source #

(GFunctor f v as bs, GFunctor g v as bs) => GFunctor (f :+: g :: LoT k -> Type) v (as :: LoT k) (bs :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmap :: Mappings v as bs -> (f :+: g) as -> (f :+: g) bs Source #

(Interpret c as => GFunctor f v as bs, Interpret c bs) => GFunctor (c :=>: f :: LoT k -> Type) v (as :: LoT k) (bs :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmap :: Mappings v as bs -> (c :=>: f) as -> (c :=>: f) bs Source #

(forall t. GFunctor f ('Co ': v) (t :&&: as) (t :&&: bs)) => GFunctor (Exists Type f :: LoT k -> Type) v (as :: LoT k) (bs :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmap :: Mappings v as bs -> Exists Type f as -> Exists Type f bs Source #

GFunctor f v as bs => GFunctor (M1 i c f :: LoT k -> Type) v (as :: LoT k) (bs :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmap :: Mappings v as bs -> M1 i c f as -> M1 i c f bs Source #

class GFunctorArg (t :: Atom d Type) (v :: Variances) (intended :: Variance) (as :: LoT d) (bs :: LoT d) where Source #

Methods

gfmapf :: Proxy t -> Proxy intended -> Mappings v as bs -> Mapping intended (Interpret t as) (Interpret t bs) Source #

Instances

Instances details
(forall t. GFunctorArg f ('Co ': v) 'Co (t :&&: as) (t :&&: bs)) => GFunctorArg ('ForAll f :: Atom d (TYPE LiftedRep)) v 'Co (as :: LoT d) (bs :: LoT d) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmapf :: Proxy ('ForAll f) -> Proxy 'Co -> Mappings v as bs -> Mapping 'Co (Interpret ('ForAll f) as) (Interpret ('ForAll f) bs) Source #

GFunctorArg ('Kon t :: Atom d Type) v 'Co (as :: LoT d) (bs :: LoT d) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmapf :: Proxy ('Kon t) -> Proxy 'Co -> Mappings v as bs -> Mapping 'Co (Interpret ('Kon t) as) (Interpret ('Kon t) bs) Source #

GFunctorArg ('Kon t :: Atom d Type) v 'Contra (as :: LoT d) (bs :: LoT d) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmapf :: Proxy ('Kon t) -> Proxy 'Contra -> Mappings v as bs -> Mapping 'Contra (Interpret ('Kon t) as) (Interpret ('Kon t) bs) Source #

(KFunctor f '[v1] (Interpret x as :&&: 'LoT0) (Interpret x bs :&&: 'LoT0), GFunctorArg x v v1 as bs) => GFunctorArg (f :$: x :: Atom d (TYPE LiftedRep)) v 'Co (as :: LoT d) (bs :: LoT d) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmapf :: Proxy (f :$: x) -> Proxy 'Co -> Mappings v as bs -> Mapping 'Co (Interpret (f :$: x) as) (Interpret (f :$: x) bs) Source #

(KFunctor f '[v1, v2] (Interpret x as :&&: (Interpret y as :&&: 'LoT0)) (Interpret x bs :&&: (Interpret y bs :&&: 'LoT0)), GFunctorArg x v v1 as bs, GFunctorArg y v v2 as bs) => GFunctorArg ((f :$: x) :@: y :: Atom d (TYPE LiftedRep)) v 'Co (as :: LoT d) (bs :: LoT d) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmapf :: Proxy ((f :$: x) :@: y) -> Proxy 'Co -> Mappings v as bs -> Mapping 'Co (Interpret ((f :$: x) :@: y) as) (Interpret ((f :$: x) :@: y) bs) Source #

(KFunctor f '[v1, v2, v3] (Interpret x as :&&: (Interpret y as :&&: (Interpret z as :&&: 'LoT0))) (Interpret x bs :&&: (Interpret y bs :&&: (Interpret z bs :&&: 'LoT0))), GFunctorArg x v v1 as bs, GFunctorArg y v v2 as bs, GFunctorArg z v v3 as bs) => GFunctorArg (((f :$: x) :@: y) :@: z :: Atom d (TYPE LiftedRep)) v 'Co (as :: LoT d) (bs :: LoT d) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmapf :: Proxy (((f :$: x) :@: y) :@: z) -> Proxy 'Co -> Mappings v as bs -> Mapping 'Co (Interpret (((f :$: x) :@: y) :@: z) as) (Interpret (((f :$: x) :@: y) :@: z) bs) Source #

GFunctorArg ('Var ('VZ :: TyVar (Type -> xs) Type) :: Atom (Type -> xs) Type) (r ': v) r (a :&&: as :: LoT (Type -> xs)) (b :&&: bs :: LoT (Type -> xs)) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmapf :: Proxy ('Var 'VZ) -> Proxy r -> Mappings (r ': v) (a :&&: as) (b :&&: bs) -> Mapping r (Interpret ('Var 'VZ) (a :&&: as)) (Interpret ('Var 'VZ) (b :&&: bs)) Source #

GFunctorArg ('Var vr) v intended as bs => GFunctorArg ('Var ('VS vr :: TyVar (x -> ks) Type) :: Atom (x -> ks) Type) (pre ': v) intended (a :&&: as :: LoT (x -> ks)) (b :&&: bs :: LoT (x -> ks)) Source # 
Instance details

Defined in Generics.Kind.Derive.KFunctor

Methods

gfmapf :: Proxy ('Var ('VS vr)) -> Proxy intended -> Mappings (pre ': v) (a :&&: as) (b :&&: bs) -> Mapping intended (Interpret ('Var ('VS vr)) (a :&&: as)) (Interpret ('Var ('VS vr)) (b :&&: bs)) Source #