Add term Function.($).
authorJulien Moutinho <julm+symantic@autogeree.net>
Tue, 15 Aug 2017 19:02:03 +0000 (21:02 +0200)
committerJulien Moutinho <julm+symantic@autogeree.net>
Tue, 15 Aug 2017 19:02:03 +0000 (21:02 +0200)
symantic-lib/Language/Symantic/Lib/Function.hs

index 4a468dbca6f18b4b4f243918180c81d4db065a39..acbd50a15570041d7a138fb4b0fb09031453cf21 100644 (file)
@@ -74,7 +74,7 @@ instance (Source src, SymInj ss (->)) => ModuleFor src ss (->) where
         , "flip"  := teFunction_flip
         , "id"    := teFunction_id
         , "." `withInfixR` 9 := teFunction_compose
-        -- , "$" `withInfixR` 0 := teFunction_app
+        , "$" `withInfixR` 0 := teFunction_apply
         ]
 
 -- ** 'Type's
@@ -105,3 +105,6 @@ teFunction_flip = Term noConstraint ((a0 ~> b1 ~> c2) ~> (b1 ~> a0 ~> c2)) $ teS
 
 teFunction_id :: TermDef (->) '[Proxy a] (() #> (a -> a))
 teFunction_id = Term noConstraint (a0 ~> a0) $ teSym @(->) $ lam1 id
+
+teFunction_apply :: TermDef (->) '[Proxy a, Proxy b] (() #> ((a -> b) -> a -> b))
+teFunction_apply = Term noConstraint ((a0 ~> b1) ~> a0 ~> b1) $ teSym @(->) apply