Make stack flags customizable in GNUmakefile.
[haskell/symantic.git] / symantic-lib / Language / Symantic / Lib / Applicative.hs
index 0043a9ca30a47707c58af555c1f8d544a90c284b..b83346ccb4a720bc4c0b7c5c2be6566e8645320a 100644 (file)
@@ -13,7 +13,7 @@ import Language.Symantic.Lib.Function (a0, b1)
 import Language.Symantic.Lib.Functor (Sym_Functor(..), (<$>), f1, f2)
 
 -- * Class 'Sym_Applicative'
-type instance Sym (Proxy Applicative) = Sym_Applicative
+type instance Sym Applicative = Sym_Applicative
 class Sym_Functor term => Sym_Applicative term where
        pure  :: Applicative f => term a -> term (f a)
        (<*>) :: Applicative f => term (f (a -> b)) -> term (f a) -> term (f b); infixl 4 <*>
@@ -49,14 +49,16 @@ instance (Sym_Lambda term, Sym_Applicative term) => Sym_Applicative (BetaT term)
        (*>) = trans2 (*>)
 
 -- Typing
+instance NameTyOf Applicative where
+       nameTyOf _c = ["Applicative"] `Mod` "Applicative"
 instance FixityOf Applicative
 instance ClassInstancesFor Applicative
 instance TypeInstancesFor Applicative
 
 -- Compiling
 instance Gram_Term_AtomsFor src ss g Applicative
-instance (Source src, Inj_Sym ss Applicative) => ModuleFor src ss Applicative where
-       moduleFor _s = ["Applicative"] `moduleWhere`
+instance (Source src, SymInj ss Applicative) => ModuleFor src ss Applicative where
+       moduleFor = ["Applicative"] `moduleWhere`
         [ "<*>" `withInfixL` 4 := teApplicative_app
         , "<*"  `withInfixL` 4 := teApplicative_const
         , "*>"  `withInfixL` 4 := teApplicative_tsnoc