[project @ 1996-07-25 21:02:03 by partain]
[nofib.git] / GHC_ONLY / cg027 / Main.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)::Foo a => a)
7 ((fromInteger 37)::Foo a => a)) "\n")
8
9 f :: Foo a => a -> a -> Integer
10
11 f a b = toInteger (a + b)