projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1997-07-30 23:52:45 by sof]
[ghc-hetmet.git]
/
ghc
/
compiler
/
tests
/
typecheck
/
should_succeed
/
tc050.hs
1
module ShouldSucceed where
2
3
class Foo a where
4
o_and :: a -> a -> a
5
6
7
instance Foo Bool where
8
o_and False x = False
9
o_and x False = False
10
o_and True True = True
11
12
13
instance Foo Int where
14
o_and x 0 = 0
15
o_and 0 x = 0
16
o_and 1 1 = 1
17
18
19
f x y = o_and x False
20
21
g x y = o_and x 1
22
23