summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/T2721.hs
blob: 916916d25038a71be20a1646aec3b3c941dcec42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
-- 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)