summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc142.hs
blob: 862171003894abc1ff6c4c282dfcd820d15ad9b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
-- !!! Legitimate re-use of prelude class-method name (==)
-- Used not to be legal, but a late H98 change made it legal
--
module ShouldFail where

data NUM = ONE | TWO
class EQ a where
	(==) :: a -> a -> Bool

instance EQ NUM where
	a == b = True