diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail118.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail118.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail118.hs b/testsuite/tests/typecheck/should_fail/tcfail118.hs new file mode 100644 index 0000000000..1b81c7e01a --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/tcfail118.hs @@ -0,0 +1,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 + |