projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1999-01-23 17:57:35 by sof]
[ghc-hetmet.git]
/
ghc
/
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
-}