summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/PolyKinds01.hs
blob: 2f5f1e8521793a7886f1841dc1a2cb77ad65b273 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{-# LANGUAGE PolyKinds                  #-}
{-# 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