projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ef03b282d908116441dd2911d3f2a41b9892171e
[ghc-hetmet.git]
/
ghc
/
tests
/
typecheck
/
should_compile
/
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