import "JavaBuiltin" as Java infixl 6 (+) class Additive a where (+) :: a -> a -> a instance Additive Double where x + y = Java.dadd x y instance Additive Integer where x + y = Java.iadd x y main = ((1.0 :: Double)+(2.0 :: Double),(3::Integer)+(4::Integer)) -- (3.0,7)