X-Git-Url: http://git.megacz.com/?p=coq-hetmet.git;a=blobdiff_plain;f=examples%2FDemo.hs;h=ff4468c59e808d6d2882e412477d392624a26977;hp=fea2dc7d960af4181932dee030d6a5583f12ed21;hb=2444f0cbf7ed5c744c43dbca114a4f400cd1522f;hpb=14afe39e905be69eabd8944b97bb2b731bf44939 diff --git a/examples/Demo.hs b/examples/Demo.hs index fea2dc7..ff4468c 100644 --- a/examples/Demo.hs +++ b/examples/Demo.hs @@ -1,9 +1,19 @@ {-# OPTIONS_GHC -XRankNTypes -XScopedTypeVariables -XFlexibleContexts -XModalTypes -XKindSignatures -fcoqpass -XMultiParamTypeClasses -dcore-lint #-} +module Demo (foo) where import GHC.HetMet.GArrow import GHC.HetMet.CodeTypes import GHC.HetMet.Private -import GArrowTikZ +--import GArrowTikZ -foo x = <[ ~~x ]> +{- +foo :: (forall g a . <[ () -> a + PGArrow g (GArrowUnit g) a -> + (forall b . PGArrow g (GArrowTensor g b b) b) -> +-} +--foo con mer = <[ ~~mer ~~con ~~con ]> +--foo const merge = <[ ~~merge ~~const (~~merge ~~const ~~const) ]> +foo const merge = <[ ~~merge ~~const ~~const ]> -main = tikz' $ pga_flatten . foo . pga_unflatten +--tester2 f = <[ \x -> ~~f x x ]> + +--main = tikz' $ \a b -> pga_flatten (foo (pga_unflatten a))