add examples of first-order (kappa calculus) terms at level-1
authorAdam Megacz <megacz@cs.berkeley.edu>
Thu, 1 Sep 2011 04:35:17 +0000 (21:35 -0700)
committerAdam Megacz <megacz@cs.berkeley.edu>
Thu, 1 Sep 2011 04:35:17 +0000 (21:35 -0700)
examples/KappaDemo.hs [new file with mode: 0644]
examples/Makefile

diff --git a/examples/KappaDemo.hs b/examples/KappaDemo.hs
new file mode 100644 (file)
index 0000000..f052012
--- /dev/null
@@ -0,0 +1,12 @@
+{-# OPTIONS_GHC -XModalTypes -dcore-lint -XScopedTypeVariables -ddump-types #-}
+module Demo (demo, demo2) where
+
+demo  z   = <{ \y -> ~~z }>
+
+demo2 :: <[ (a,b) ~~> c ]>@d -> <[ () ~~> a ]>@d -> <[ b ~~>c ]>@d
+demo2 x y = <{ ~~x ~~y }>
+
+demo3 x y z q = <{ ~~q (~~x ~~y ~~z) }>
+
+
+
index f880d81..09e4b9c 100644 (file)
@@ -5,6 +5,7 @@ open:
        open .build/test.pdf
 
 #sanity += BiGArrow.hs
+sanity += KappaDemo.hs
 sanity += CircuitExample.hs
 sanity += CommandSyntaxExample.hs
 sanity += DotProduct.hs