[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / typecheck / should_fail / tcfail040.hs
1 --!!! instances of functions
2 --
3 module M 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 -}