summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail040.hs
blob: 8ac06b363cc6d0136939f87169b427d2c3f69936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-- !!! instances of functions
--
module ShouldFail where

data NUM = ONE | TWO

class EQ a where
	(===) :: a -> a -> Bool

class ORD a where
	(<<) :: a -> a -> Bool
	a << b = True

instance EQ (a -> b) where
	f === g = True

instance ORD (a -> b)

f = (<<) === (<<)
--f :: (EQ a,Num a) => a -> a -> Bool


{-
instance EQ NUM where
--	a /= b = False
	a === b = True
--	a /= b = False

-}