-- * Type 'Element'
data Element
type instance Fam Element '[h] = MT.Element (UnProxy h)
+instance NameTyOf Element where
+ nameTyOf _c = ["MonoFunctor"] `Mod` "Element"
instance ClassInstancesFor Element
instance TypeInstancesFor Element where
- expandFamFor _c _len f (TyApp _ (TyApp _ z _ty_r) a `TypesS` TypesZ)
+ expandFamFor _c _len f (z:@_ty_r:@ a `TypesS` TypesZ)
| Just HRefl <- proj_ConstKi @_ @Element f
, Just HRefl <- proj_ConstKiTy @_ @(->) z
= Just a
-- ** 'Type's
famElement :: Source src => Type src vs t -> Type src vs (MT.Element t)
-famElement o = TyFam noSource (lenVars o) (inj_Const @Element) (o `TypesS` TypesZ)
+famElement o = TyFam noSource (lenVars o) (constInj @Element) (o `TypesS` TypesZ)
-- * Class 'Sym_MonoFunctor'
type instance Sym MonoFunctor = Sym_MonoFunctor
class Sym_MonoFunctor term where
omap :: MonoFunctor o => term (MT.Element o -> MT.Element o) -> term o -> term o
- default omap
- :: Sym_MonoFunctor (UnT term)
- => Trans term
- => MonoFunctor o
- => term (MT.Element o -> MT.Element o) -> term o -> term o
+ default omap ::
+ Sym_MonoFunctor (UnT term) =>
+ Trans term =>
+ MonoFunctor o =>
+ term (MT.Element o -> MT.Element o) -> term o -> term o
omap = trans2 omap
-- Interpreting
instance (Sym_MonoFunctor term, Sym_Lambda term) => Sym_MonoFunctor (BetaT term)
-- Typing
+instance NameTyOf MonoFunctor where
+ nameTyOf _c = ["MonoFunctor"] `Mod` "MonoFunctor"
instance FixityOf MonoFunctor
instance ClassInstancesFor MonoFunctor
instance TypeInstancesFor MonoFunctor
-- Compiling
instance Gram_Term_AtomsFor src ss g MonoFunctor
-instance (Source src, Inj_Sym ss MonoFunctor) => ModuleFor src ss MonoFunctor where
+instance (Source src, SymInj ss MonoFunctor) => ModuleFor src ss MonoFunctor where
moduleFor = ["MonoFunctor"] `moduleWhere`
[ "omap" := teMonoFunctor_omap
]
tyMonoFunctor :: Source src => Type src vs a -> Type src vs (MonoFunctor a)
tyMonoFunctor a = tyConstLen @(K MonoFunctor) @MonoFunctor (lenVars a) `tyApp` a
-o0 :: Source src => Inj_Len vs => Inj_Kind (K o) =>
+o0 :: Source src => LenInj vs => KindInj (K o) =>
Type src (Proxy o ': vs) o
o0 = tyVar "o" varZ
-e1 :: Source src => Inj_Len vs => Inj_Kind (K e) =>
+e1 :: Source src => LenInj vs => KindInj (K e) =>
Type src (a ': Proxy e ': vs) e
e1 = tyVar "e" $ VarS varZ