Commit 970e190c authored by simonpj's avatar simonpj
Browse files

Test for Trac #1251

parent da519868
{-# OPTIONS_GHC -fglasgow-exts #-}
-- See Trac #1251 and the comments
-- Note [Pruning dead case alternatives] in types/Unify.lhs
module Main( main ) where
data T a where MkT :: T Int
class C a where ic :: T a
instance C Int where ic = MkT
newtype A = MkA Int deriving( C )
-- axiom CoA : A ~ Int
-- Hence C Int ~ C A
-- instance C A where
-- ic :: T A
-- ic = MkT
icA = ic :: T A -- There are no (non-bot) values of this type
main = print (icA `seq` "ok")
......@@ -75,3 +75,4 @@ test('set', normal, compile, [''])
# test('Arith', normal, compile, [''])
test('Session', normal, compile_and_run, [''])
test('CasePrune', normal, compile_and_run, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment