blob: d43e6f422589528f71d89114ea5c335f2243fa2a (
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
-}
|