@@ -48,19 +48,15 @@ using (G : Vect Ty n)
48 (==) : Expr G TyInt -> Expr G TyInt -> Expr G TyBool
48 (==) : Expr G TyInt -> Expr G TyInt -> Expr G TyBool
49 (==) = Op (==)
49 (==) = Op (==)
51− -- Some dummy instances for Num overloading
51+ (<) : Expr G TyInt -> Expr G TyInt -> Expr G TyBool
52− instance Eq (Expr G TyInt) where
52+ (<) = Op (<)
55− instance Ord (Expr G TyInt) where
58 instance Num (Expr G TyInt) where
54 instance Num (Expr G TyInt) where
59 (+) x y = Op (+) x y
55 (+) x y = Op (+) x y
60 (-) x y = Op (-) x y
56 (-) x y = Op (-) x y
61 (*) x y = Op (*) x y
57 (*) x y = Op (*) x y
63− abs x = If (Op (<) x (Val 0)) (Op (-) 0 x) x
59+ abs x = IF (x < 0) THEN (-x) ELSE x
65 fromInteger = Val . fromInteger
61 fromInteger = Val . fromInteger