diff options
Diffstat (limited to 'testsuite/tests/gadt/gadt23.hs')
-rw-r--r-- | testsuite/tests/gadt/gadt23.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/gadt/gadt23.hs b/testsuite/tests/gadt/gadt23.hs new file mode 100644 index 0000000000..95e2710292 --- /dev/null +++ b/testsuite/tests/gadt/gadt23.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE GADTs #-} + +module Main where + +import Gadt23_AST + +data Foo = Foo { bar :: Int } + +convert :: AST a tag -> AST a Foo +convert t = case t of + Var v -> Tag (Foo 42) $ Var v + Tag t e -> Tag (Foo 42) $ convert e + +main = return () + |