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

Generics.Kind.Derive.FunctorPosition

Documentation

fmapDefaultPos :: forall v f as bs. (GenericK f, GenericK f, GFunctorPos (RepK f) v as bs) => (Interpret ('Var v) as -> Interpret ('Var v) bs) -> (f :@@: as) -> f :@@: bs Source #

fmapDefault :: forall f a b. (GenericK f, GenericK f, GFunctorPos (RepK f) 'VZ (LoT1 a) (LoT1 b)) => (a -> b) -> f a -> f b Source #

bimapDefault :: forall f a c b d. (GenericK f, GenericK f, GenericK f, GFunctorPos (RepK f) 'VZ (LoT2 a d) (LoT2 c d), GFunctorPos (RepK f) ('VS 'VZ) (LoT2 a b) (LoT2 a d)) => (a -> c) -> (b -> d) -> f a b -> f c d Source #

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

Methods

gfmapp :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> f as -> f bs Source #

Instances

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

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmapp :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> U1 as -> U1 bs Source #

GFunctorArgPos t v as bs (ContainsTyVar v t) => GFunctorPos (Field t :: LoT k -> Type) (v :: TyVar k Type) (as :: LoT k) (bs :: LoT k) Source # 
Instance details

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmapp :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> Field t as -> Field t bs Source #

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

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmapp :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> (f :*: g) as -> (f :*: g) bs Source #

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

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmapp :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> (f :+: g) as -> (f :+: g) bs Source #

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

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmapp :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> (c :=>: f) as -> (c :=>: f) bs Source #

(forall (t :: k2). GFunctorPos f ('VS v :: TyVar (k2 -> k1) Type) (t :&&: as) (t :&&: bs)) => GFunctorPos (Exists k2 f :: LoT k1 -> Type) (v :: TyVar k1 Type) (as :: LoT k1) (bs :: LoT k1) Source # 
Instance details

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmapp :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> Exists k2 f as -> Exists k2 f bs Source #

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

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmapp :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> M1 i c f as -> M1 i c f bs Source #

class GFunctorArgPos (t :: Atom d Type) (v :: TyVar d Type) (as :: LoT d) (bs :: LoT d) (p :: Bool) where Source #

Methods

gfmappf :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> Interpret t as -> Interpret t bs Source #

Instances

Instances details
Interpret t as ~ Interpret t bs => GFunctorArgPos (t :: Atom d Type) (v :: TyVar d Type) (as :: LoT d) (bs :: LoT d) 'False Source # 
Instance details

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmappf :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> Interpret t as -> Interpret t bs Source #

(TypeError ('Text "Should never get here") :: Constraint) => GFunctorArgPos ('Kon t :: Atom d Type) (v :: TyVar d Type) (as :: LoT d) (bs :: LoT d) whatever Source # 
Instance details

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmappf :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> Interpret ('Kon t) as -> Interpret ('Kon t) bs Source #

(Functor (Interpret f as), Interpret f as ~ Interpret f bs, GFunctorArgPos x v as bs (ContainsTyVar v x)) => GFunctorArgPos (f :@: x :: Atom d Type) (v :: TyVar d Type) (as :: LoT d) (bs :: LoT d) 'True Source # 
Instance details

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmappf :: (Interpret ('Var v) as -> Interpret ('Var v) bs) -> Interpret (f :@: x) as -> Interpret (f :@: x) bs Source #

(TypeError ('Text "Should never get here") :: Constraint) => GFunctorArgPos ('Var ('VS n :: TyVar (Type -> TYPE LiftedRep) Type) :: Atom (Type -> TYPE LiftedRep) Type) ('VZ :: TyVar (Type -> TYPE LiftedRep) Type) (r :&&: 'LoT0 :: LoT (Type -> TYPE LiftedRep)) (r :&&: 'LoT0 :: LoT (Type -> TYPE LiftedRep)) 'True Source # 
Instance details

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmappf :: (Interpret ('Var 'VZ) (r :&&: 'LoT0) -> Interpret ('Var 'VZ) (r :&&: 'LoT0)) -> Interpret ('Var ('VS n)) (r :&&: 'LoT0) -> Interpret ('Var ('VS n)) (r :&&: 'LoT0) Source #

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

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmappf :: (Interpret ('Var 'VZ) (a :&&: as) -> Interpret ('Var 'VZ) (b :&&: bs)) -> Interpret ('Var 'VZ) (a :&&: as) -> Interpret ('Var 'VZ) (b :&&: bs) Source #

(TypeError ('Text "Should never get here") :: Constraint) => GFunctorArgPos ('Var ('VZ :: TyVar (Type -> xs) Type) :: Atom (Type -> xs) Type) ('VS n :: TyVar (Type -> xs) Type) (r :&&: as :: LoT (Type -> xs)) (r :&&: bs :: LoT (Type -> xs)) 'True Source # 
Instance details

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmappf :: (Interpret ('Var ('VS n)) (r :&&: as) -> Interpret ('Var ('VS n)) (r :&&: bs)) -> Interpret ('Var 'VZ) (r :&&: as) -> Interpret ('Var 'VZ) (r :&&: bs) Source #

GFunctorArgPos ('Var v) n as bs isthere => GFunctorArgPos ('Var ('VS v :: TyVar (x -> d) Type) :: Atom (x -> d) Type) ('VS n :: TyVar (x -> d) Type) (r :&&: as :: LoT (x -> d)) (s :&&: bs :: LoT (x -> d)) isthere Source # 
Instance details

Defined in Generics.Kind.Derive.FunctorPosition

Methods

gfmappf :: (Interpret ('Var ('VS n)) (r :&&: as) -> Interpret ('Var ('VS n)) (s :&&: bs)) -> Interpret ('Var ('VS v)) (r :&&: as) -> Interpret ('Var ('VS v)) (s :&&: bs) Source #