summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/gadt8.hs
blob: ba5ecaa60324b89f14703c58f82eda49319389d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE GADTs, KindSignatures #-}

-- Test a couple of trivial things:
--      explicit layout
--      trailing semicolons
--      kind signatures
module ShouldCompile where

import Data.Kind (Type)

data Expr :: Type -> Type where {
   EInt    :: Int                                 -> Expr Int  ;
   EBool   :: Bool                                -> Expr Bool ;
   EIf     :: (Expr Bool) -> (Expr a) -> (Expr a) -> Expr a    ;
                -- Note trailing semicolon, should be ok
  }