Commit 19054d35 authored by simonpj's avatar simonpj
Browse files

Test Trac #2850

parent 3adf1c56
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeFamilies, FlexibleContexts, FlexibleInstances #-}
module T2850 where
class K a where
bar :: a -> a
class K (B a) => M a where
data B a :: *
foo :: B a -> B a
instance M Bool where
data B Bool = B1Bool Bool | B2Bool Bool
foo = id
instance K (B Bool) where
bar = id
instance M Int where
newtype B Int = BInt (B Bool) deriving K
foo = id
......@@ -134,3 +134,4 @@ test('T3208a', if_compiler_lt('ghc', '6.11', expect_fail), compile, [''])
test('T3208b', expect_fail, compile, [''])
test('T3418', if_compiler_lt('ghc', '6.11', expect_fail), compile, [''])
test('T3423', normal, compile, [''])
test('T2850', normal, compile, [''])
Supports Markdown
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