summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/deriving-1935.hs
blob: add1f73590fdc47aaf8ab720d042c0963a52e7a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{-# OPTIONS_GHC -XDeriveDataTypeable #-}

-- #1935
-- See Note [Superclasses of derived instance] in TcDeriv

{-# OPTIONS -fno-warn-redundant-constraints #-}

module Foo where

 import Data.Data

 data Foo a = Foo
    deriving (Data, Typeable)

 data T a = MkT (S a) deriving( Ord )

 instance Num a => Eq (T a)

 data S a = S
 instance Eq (S a)
 instance Ord (S a)