add Demo.hs
authorAdam Megacz <megacz@cs.berkeley.edu>
Mon, 9 May 2011 21:10:38 +0000 (14:10 -0700)
committerAdam Megacz <megacz@cs.berkeley.edu>
Mon, 9 May 2011 21:10:38 +0000 (14:10 -0700)
examples/Demo.hs [new file with mode: 0644]
examples/Makefile

diff --git a/examples/Demo.hs b/examples/Demo.hs
new file mode 100644 (file)
index 0000000..74bbef0
--- /dev/null
@@ -0,0 +1,10 @@
+{-# OPTIONS_GHC -XRankNTypes -XScopedTypeVariables -XFlexibleContexts -XModalTypes -XKindSignatures -fcoqpass -XMultiParamTypeClasses -dcore-lint #-}
+import GHC.HetMet.GArrow
+import GHC.HetMet.CodeTypes
+import GHC.HetMet.Private
+import GArrowTikZ
+
+foo x = <[ ~~x ]>
+foo' = unG . pga_flatten . foo . pga_unflatten
+--foo x z = <[ let y = ~~x in ~~z y y ]>
+main = tikz (foo' (PGArrowD { unG = TikZ_const 12 }))
index 082c82e..7819837 100644 (file)
@@ -5,8 +5,8 @@ all:
                RegexMatcher.hs Unify.hs GArrowTikZ.hs
 
 tikz:
                RegexMatcher.hs Unify.hs GArrowTikZ.hs
 
 tikz:
-       mkdir .build
-       ../../../inplace/bin/ghc-stage2 -odir .build -hidir .build GArrowTikZ.hs Unify.hs
-       ./GArrowTikZ > .build/test.tex
+       mkdir -p .build
+       ../../../inplace/bin/ghc-stage2 -odir .build -hidir .build GArrowTikZ.hs Unify.hs test.hs
+       ./test > .build/test.tex
        cd .build; pdflatex test.tex
        open .build/test.pdf
        cd .build; pdflatex test.tex
        open .build/test.pdf