[project @ 1997-09-05 14:11:05 by simonm]
[ghc-hetmet.git] / ghc / tests / codeGen / should_run / cg027.hs
1 --!!! simple test of 0-method classes
2 --
3
4 class (Num a, Integral a) => Foo a
5
6 main = putStr (shows (f ((fromInteger 21)::Int)
7                         ((fromInteger 37))) "\n")
8
9 instance Foo Int
10
11 f :: Foo a => a -> a -> Integer
12
13 f a b = toInteger (a + b)