summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/PolyKinds11.hs
diff options
context:
space:
mode:
authorJose Pedro Magalhaes <jpm@cs.uu.nl>2011-11-21 09:51:14 +0000
committerJose Pedro Magalhaes <jpm@cs.uu.nl>2011-11-21 14:57:55 +0000
commit6f9490423393ec97c5fad4862c6d97f5ec92452d (patch)
tree444dadf547a429d1eab64dcbe9a27d2a238f59ba /testsuite/tests/polykinds/PolyKinds11.hs
parent09182c1e43a4f04d4d903bf485e4077cf14a84af (diff)
downloadhaskell-6f9490423393ec97c5fad4862c6d97f5ec92452d.tar.gz
Simple test for PolyKinds inference
Diffstat (limited to 'testsuite/tests/polykinds/PolyKinds11.hs')
-rw-r--r--testsuite/tests/polykinds/PolyKinds11.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/PolyKinds11.hs b/testsuite/tests/polykinds/PolyKinds11.hs
new file mode 100644
index 0000000000..c7eea5b271
--- /dev/null
+++ b/testsuite/tests/polykinds/PolyKinds11.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE GADTs #-}
+
+module PolyKinds11 where
+
+-- Test inference
+
+data Nat = Ze | Su Nat
+
+data Vec a n where -- Vec :: * -> Nat -> *
+ VNil :: Vec a Ze
+ VCons :: a -> Vec a n -> Vec a (Su n)