projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
727f2886aeec0134433b038c1b3765863b99f990
[ghc-hetmet.git]
/
ghc
/
compiler
/
tests
/
typecheck
/
should_succeed
/
tc043.hs
1
module ShouldSucceed where
2
3
--!!! another simple test of class and instance code.
4
5
class A a where
6
op1 :: a
7
8
instance A Int where
9
op1 = 2
10
11
f x = op1
12
13
class B b where
14
op2 :: b -> Int
15
16
instance (B a) => B [a] where
17
op2 [] = 0
18
op2 (x:xs) = 1 + op2 xs