-import "JavaBuiltin" as Java\r
-\r
-infixl 6 (+), (-)\r
-\r
-class Num a where \r
- (+) :: a -> a -> a\r
- (-) :: a -> a -> a\r
- isZero :: a -> Boolean\r
- one :: a \r
- \r
-instance Num Integer where\r
- x + y = Java.iadd x y\r
- x - y = Java.isub x y\r
- isZero x = Java.icmpeq Java.iconst_0 x\r
- one = Java.iconst_1\r
- \r
-even x = if isZero x then True else odd (x - one)\r
-odd x = if isZero x then False else even (x - one) \r
- \r
-main = odd (8 :: Integer)\r
---\r
-false\r
-\r
+import "JavaBuiltin" as Java
+
+infixl 6 (+), (-)
+
+class Num a where
+ (+) :: a -> a -> a
+ (-) :: a -> a -> a
+ isZero :: a -> Boolean
+ one :: a
+
+instance Num Integer where
+ x + y = Java.iadd x y
+ x - y = Java.isub x y
+ isZero x = Java.icmpeq Java.iconst_0 x
+ one = Java.iconst_1
+
+even x = if isZero x then True else odd (x - one)
+odd x = if isZero x then False else even (x - one)
+
+main = odd (8 :: Integer)
+--
+false
+