summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/PolyKinds02.hs
blob: 6a5559ccaeb4dde8871e8db71babb80423843874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# LANGUAGE DataKinds                  #-}
{-# LANGUAGE KindSignatures             #-}
{-# LANGUAGE GADTs                      #-}

module PolyKinds02 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 Nat -- Kind error
vec = vec