8ac06b363cc6d0136939f87169b427d2c3f69936
[ghc.git] / testsuite / tests / typecheck / should_fail / tcfail040.hs
1 -- !!! instances of functions
2 --
3 module ShouldFail where
4
5 data NUM = ONE | TWO
6
7 class EQ a where
8 (===) :: a -> a -> Bool
9
10 class ORD a where
11 (<<) :: a -> a -> Bool
12 a << b = True
13
14 instance EQ (a -> b) where
15 f === g = True
16
17 instance ORD (a -> b)
18
19 f = (<<) === (<<)
20 --f :: (EQ a,Num a) => a -> a -> Bool
21
22
23 {-
24 instance EQ NUM where
25 -- a /= b = False
26 a === b = True
27 -- a /= b = False
28
29 -}