Allow GeneralizedNewtypeDeriving for classes with associated type families
[ghc.git] / testsuite / tests / deriving / should_compile / T2721.hs
1 {-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}
2 {-# LANGUAGE UndecidableInstances #-}
3 -- Trac #2721
4
5 module T2721 where
6
7 class C a where
8 type T a
9 foo :: a -> T a
10
11 instance C Int where
12 type T Int = Int
13 foo = id
14
15 newtype N = N Int deriving(C)