From: Adam Megacz Date: Mon, 9 May 2011 21:10:38 +0000 (-0700) Subject: add Demo.hs X-Git-Url: http://git.megacz.com/?p=coq-hetmet.git;a=commitdiff_plain;h=15df3430938d7175361b848de6578aea195e612f add Demo.hs --- diff --git a/examples/Demo.hs b/examples/Demo.hs new file mode 100644 index 0000000..74bbef0 --- /dev/null +++ b/examples/Demo.hs @@ -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 })) diff --git a/examples/Makefile b/examples/Makefile index 082c82e..7819837 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -5,8 +5,8 @@ all: 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