update demo for new more-efficient encoding of functions
[coq-hetmet.git] / examples / Demo.hs
1 {-# OPTIONS_GHC -XRankNTypes -XScopedTypeVariables -XFlexibleContexts -XModalTypes -XKindSignatures -fcoqpass -XMultiParamTypeClasses -dcore-lint #-}
2 module Demo (foo) where
3 import GHC.HetMet.GArrow
4 import GHC.HetMet.CodeTypes
5 import GHC.HetMet.Private
6 --import GArrowTikZ
7
8 {-
9 foo :: (forall g a . <[ () -> a
10                  PGArrow g (GArrowUnit g) a ->
11                  (forall b . PGArrow g (GArrowTensor g b b) b) ->
12 -}
13 --foo con mer   = <[ ~~mer ~~con ~~con ]>
14 --foo const merge = <[ ~~merge ~~const (~~merge ~~const ~~const) ]>
15 foo const merge = <[ ~~merge ~~const ~~const ]>
16
17 --tester2 f = <[ \x -> ~~f x x ]>
18
19 --main = tikz' $ \a b -> pga_flatten (foo (pga_unflatten a))