summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail118.hs
blob: 763fa70fe3ca6f8854825036b84ca357eabf3434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- Gave a bad error message in a version of 6.3, as a
-- result of 6.3's new duplicate-instance reporting structure
--
--      Foo.hs:4:5:
--          No instance for `Eq Foo'
--          When deriving the `Eq' instance for type `Bar'

module ShouldFail where

data Bar = Bar Foo deriving Eq
data Foo = Foo deriving Eq

instance Eq Foo where
    Foo == Foo = True