summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/PolyKinds01.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/polykinds/PolyKinds01.hs')
-rw-r--r--testsuite/tests/polykinds/PolyKinds01.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/PolyKinds01.hs b/testsuite/tests/polykinds/PolyKinds01.hs
new file mode 100644
index 0000000000..918e5a9a44
--- /dev/null
+++ b/testsuite/tests/polykinds/PolyKinds01.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE GADTs #-}
+
+module PolyKinds01 where
+
+data Nat = Ze | Su Nat
+
+data Vec :: * -> Nat -> * where
+ VNil :: Vec a Ze
+ VCons :: a -> Vec a n -> Vec a (Su n)
+
+vec :: Vec Nat (Su Ze)
+vec = VCons Ze VNil