X-Git-Url: http://git.megacz.com/?p=coq-hetmet.git;a=blobdiff_plain;f=examples%2FDemo.hs;fp=examples%2FDemo.hs;h=3f631689ad11b732cf2a5daca12472b064b2a684;hp=74fe4de67e45a15deed238920714844e360ca1a7;hb=423b0bd3972c5bcbbd757cb715e13b5b9104a9a6;hpb=67e004348a218f0addeff433e723496a328403ef diff --git a/examples/Demo.hs b/examples/Demo.hs index 74fe4de..3f63168 100644 --- a/examples/Demo.hs +++ b/examples/Demo.hs @@ -1,11 +1,12 @@ -{-# OPTIONS_GHC -XModalTypes -fflatten -funsafe-skolemize -dcore-lint #-} +{-# OPTIONS_GHC -XModalTypes -fflatten -funsafe-skolemize -dcore-lint -XScopedTypeVariables #-} module Demo (demo) where --demo con mer = <[ ~~mer ~~(con (2::Int)) ~~(con (12::Int)) ]> demo const mult = - <[ let four = ~~mult four ~~(const 4) + <[ \(y::Int) -> + let four = ~~mult four ~~(const 4) -- twelve = {- {- ~~mult four -} ~~(const 12) -} four in four ]> @@ -14,7 +15,7 @@ demo :: forall a c . (Int -> <[a]>@c) -> <[a -> a -> a]>@c -> - <[a]>@c + <[Int -> a]>@c {- demo const mult =