1 import "JavaBuiltin" as Java
\r
5 class Additive a where
\r
8 instance Additive Double where
\r
9 x + y = Java.dadd x y
\r
11 instance Additive Integer where
\r
12 x + y = Java.iadd x y
\r
14 main = ((1.0 :: Double)+(2.0 :: Double),(3::Integer)+(4::Integer))
\r