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 18:03:40 by sof]
[ghc-hetmet.git]
/
ghc
/
tests
/
rename
/
should_fail
/
rnfail008.hs
1
-- !!! Class and instance decl
2
3
module Test where
4
5
class K a where
6
op1 :: a -> a -> a
7
op2 :: Int -> a
8
9
instance K Int where
10
op1 a b = a+b
11
op2 x = x
12
13
instance K Bool where
14
op1 a b = a
15
-- Pick up the default decl for op2
16
17
instance K [a] where
18
op3 a = a -- Oops! Isn't a class op of K
19