Modify a couple of error messages slightly
[ghc.git] / testsuite / tests / gadt / gadt-dim3.hs
1 {-# LANGUAGE GADTs #-}
2
3 module ShouldSucceed5 where
4
5
6 data T a where
7 C :: T Bool
8 D :: T Int
9
10
11 data Y a where
12 E :: Y Bool
13
14
15 -- should succeed, the first branch is simply inaccessible
16 foo :: T Bool -> Bool
17 foo (D) = True
18 foo (C) = False
19
20 -- should succeed, the branch is inaccessible and not even type checked
21 baz :: Y Int -> Int
22 baz (E) = "dimitris!"
23
24 -- should fail => it is an attempt to call an inaccessible branch
25 test = baz (E)