projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2001-04-03 16:28:11 by sewardj]
[ghc-hetmet.git]
/
ghc
/
tests
/
typecheck
/
should_fail
/
tcfail043.hs
diff --git
a/ghc/tests/typecheck/should_fail/tcfail043.hs
b/ghc/tests/typecheck/should_fail/tcfail043.hs
index
cc1983b
..
184a4e2
100644
(file)
--- a/
ghc/tests/typecheck/should_fail/tcfail043.hs
+++ b/
ghc/tests/typecheck/should_fail/tcfail043.hs
@@
-12,6
+12,7
@@
-- class "Eq_", type "a" (at a use of an overloaded identifier: eq)
-- class "Eq_", type "a" (at a use of an overloaded identifier: eq)
+module TcFail where
class Eq_ a where
eq :: a -> a -> Bool
class Eq_ a where
eq :: a -> a -> Bool
@@
-25,7
+26,7
@@
instance (Eq_ a) => Eq_ [a] where
then (null ys)
else if (null ys)
then False
then (null ys)
else if (null ys)
then False
- else and (eq (hd xs) (hd ys)) (eq (tl xs) (tl ys))
+ else (&&) (eq (hd xs) (hd ys)) (eq (tl xs) (tl ys))
class (Eq_ a) => Ord_ a where
gt :: a -> a -> Bool
class (Eq_ a) => Ord_ a where
gt :: a -> a -> Bool
@@
-38,8
+39,6
@@
search
then False
else if eq a (hd bs) then True else search a (tl bs)
then False
else if eq a (hd bs) then True else search a (tl bs)
-and :: Bool -> Bool -> Bool
-and True True = True
hd :: [a] -> a
hd (a:as) = a
hd :: [a] -> a
hd (a:as) = a
@@
-53,8
+52,6
@@
ordIntGt 2 3 = True
eqIntEq :: Int -> Int -> Bool
eqIntEq 2 3 = True
eqIntEq :: Int -> Int -> Bool
eqIntEq 2 3 = True
-null :: [a] -> Bool
-null [] = True