Commit 3de678a0 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #2721

parent 01c01d62
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}
-- Trac #2721
module T2721 where
class C a where
type T a
foo :: a -> T a
instance C Int where
type T Int = Int
foo = id
newtype N = N Int deriving(C)
T2721.hs:15:27:
Can't make a derived instance of `C N'
(even with cunning newtype deriving:
the class has associated types)
In the newtype declaration for `N'
......@@ -22,3 +22,4 @@ test('T2394', normal, compile_fail, [''])
test('T2604', normal, compile_fail, [''])
test('T2701', normal, compile_fail, [''])
test('T2851', normal, compile_fail, [''])
test('T2721', normal, compile_fail, [''])
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