diff options
Diffstat (limited to 'testsuite/tests/deriving/should_compile/deriving-1935.hs')
-rw-r--r-- | testsuite/tests/deriving/should_compile/deriving-1935.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/deriving-1935.hs b/testsuite/tests/deriving/should_compile/deriving-1935.hs new file mode 100644 index 0000000000..5b3bca0c77 --- /dev/null +++ b/testsuite/tests/deriving/should_compile/deriving-1935.hs @@ -0,0 +1,22 @@ +{-# OPTIONS_GHC -XDeriveDataTypeable #-} + +-- Trac #1935 +-- See Note [Superclasses of derived instance] in TcDeriv + +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) + + +
\ No newline at end of file |