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

-- This should fail, because there is no annotation on shw,
-- but it succeeds in 6.4.1

module ShouldFail where

data Term a where
   B :: Bool -> Term Bool
   I :: Int  -> Term Int

shw (I t) = ("I "++) . shows t
-- shw (B t) = ("B "++) . shows t