import Language.Symantic.Lib.MonoFunctor (Element)
-- * Class 'Sym_Maybe'
-type instance Sym (Proxy Maybe) = Sym_Maybe
+type instance Sym Maybe = Sym_Maybe
class Sym_Maybe term where
_Nothing :: term (Maybe a)
_Just :: term a -> term (Maybe a)
instance (Sym_Maybe term, Sym_Lambda term) => Sym_Maybe (BetaT term)
-- Typing
+instance NameTyOf Maybe where
+ nameTyOf _c = ["Maybe"] `Mod` "Maybe"
instance FixityOf Maybe
instance ClassInstancesFor Maybe where
proveConstraintFor _ (TyApp _ (TyConst _ _ q) c)
-- Compiling
instance Gram_Term_AtomsFor src ss g Maybe
-instance (Source src, Inj_Sym ss Maybe) => ModuleFor src ss Maybe where
+instance (Source src, SymInj ss Maybe) => ModuleFor src ss Maybe where
moduleFor = ["Maybe"] `moduleWhere`
[ "Nothing" := teMaybe_Nothing
, "Just" := teMaybe_Just
]
-- ** 'Type's
-tyMaybe :: Source src => Inj_Len vs => Type src vs a -> Type src vs (Maybe a)
+tyMaybe :: Source src => LenInj vs => Type src vs a -> Type src vs (Maybe a)
tyMaybe = (tyConst @(K Maybe) @Maybe `tyApp`)
-- ** 'Term's