kind-generics-0.1.1.0: Generic programming in GHC style for arbitrary kinds and GADTs.

Safe HaskellSafe
LanguageHaskell2010

Generics.Kind.Derive.Functor

Documentation

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

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

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

Methods

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

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

Defined in Generics.Kind.Derive.Functor

Methods

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

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

Defined in Generics.Kind.Derive.Functor

Methods

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

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

Defined in Generics.Kind.Derive.Functor

Methods

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

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

Defined in Generics.Kind.Derive.Functor

Methods

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

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

Defined in Generics.Kind.Derive.Functor

Methods

gfmap :: Mappings v as bs -> (c :=>: f) as -> (c :=>: f) 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.Functor

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.Functor

Methods

gfmap :: Mappings v as bs -> (f :+: g) as -> (f :+: g) 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.Functor

Methods

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

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

Methods

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

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

Defined in Generics.Kind.Derive.Functor

Methods

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

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

Defined in Generics.Kind.Derive.Functor

Methods

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

(KFunctor f (v1 ': (v2 ': (v3 ': ([] :: [Variance])))) (Ty x as :&&: (Ty y as :&&: (Ty z as :&&: LoT0))) (Ty x bs :&&: (Ty y bs :&&: (Ty 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) v Co (as :: LoT d) (bs :: LoT d) Source # 
Instance details

Defined in Generics.Kind.Derive.Functor

Methods

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

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

Defined in Generics.Kind.Derive.Functor

Methods

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

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

Defined in Generics.Kind.Derive.Functor

Methods

gfmapf :: Proxy (f :$: x) -> Proxy Co -> Mappings v as bs -> Mapping Co (Ty (f :$: x) as) (Ty (f :$: x) 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.Functor

Methods

gfmapf :: Proxy (Var VZ) -> Proxy r -> Mappings (r ': v) (a :&&: as) (b :&&: bs) -> Mapping r (Ty (Var VZ) (a :&&: as)) (Ty (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.Functor

Methods

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