Update Trac ticket URLs to point to GitLab
[ghc.git] / testsuite / tests / gadt / CasePrune.hs
1 {-# LANGUAGE GADTs, GeneralizedNewtypeDeriving #-}
2
3 -- See #1251 and the comments
4 -- Note [Pruning dead case alternatives] in types/Unify.lhs
5
6 module Main( main ) where
7
8 data T a where MkT :: T Int
9
10 class C a where ic :: T a
11
12 instance C Int where ic = MkT
13
14 newtype A = MkA Int deriving( C )
15
16 -- axiom CoA : A ~ Int
17 -- Hence C Int ~ C A
18
19 -- instance C A where
20 -- ic :: T A
21 -- ic = MkT
22
23 icA = ic :: T A -- There are no (non-bot) values of this type
24
25 main = print (icA `seq` "ok")
26
27
28