Add tar GNUmakefile target.
[haskell/symantic.git] / symantic-lib / Language / Symantic / Lib / Maybe.hs
index af3369e13386ab800881a14d796b17b8162d3e03..595e6c653723dbc27e432a045b3c4a064da0fd38 100644 (file)
@@ -13,7 +13,7 @@ import Language.Symantic.Lib.Function (a0, b1)
 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)
@@ -45,6 +45,8 @@ instance (Sym_Maybe r1, Sym_Maybe r2) => Sym_Maybe (Dup r1 r2) where
 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)
@@ -78,7 +80,7 @@ instance TypeInstancesFor Maybe where
 
 -- 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
@@ -86,7 +88,7 @@ instance (Source src, Inj_Sym ss Maybe) => ModuleFor src ss Maybe where
         ]
 
 -- ** '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