@@ -205,7 +205,7 @@ intArith ity =
205205 [ iBinOp ity "add" (bitBin ity (+)) (LPlus . ATInt) total
206206 , iBinOp ity "sub" (bitBin ity (-)) (LMinus . ATInt) total
207207 , iBinOp ity "mul" (bitBin ity (*)) (LTimes . ATInt) total
208− , iBinOp ity "udiv" (bitBin ity div) LUDiv partial
208+ , iBinOp ity "udiv" (bitBin ity quot) LUDiv partial
209209 , iBinOp ity "sdiv" (bsdiv ity) (LSDiv . ATInt) partial
210210 , iBinOp ity "urem" (bitBin ity rem) LURem partial
211211 , iBinOp ity "srem" (bsrem ity) (LSRem . ATInt) partial
@@ -285,17 +285,17 @@ bsrem ITChar [Ch x, Ch y] = Just $ Ch (chr $ (ord x) `rem` (ord y))
285285bsrem _ _ = Nothing
286286
287287bsdiv :: IntTy -> [Const] -> Maybe Const
288−bsdiv ITBig [BI x, BI y] = Just . BI $ x `div` y
288+bsdiv ITBig [BI x, BI y] = Just . BI $ x `quot` y
289289bsdiv (ITFixed IT8) [B8 x, B8 y]
290− = Just $ B8 (fromIntegral (fromIntegral x `div` fromIntegral y :: Int8))
290+ = Just $ B8 (fromIntegral (fromIntegral x `quot` fromIntegral y :: Int8))
291291bsdiv (ITFixed IT16) [B16 x, B16 y]
292− = Just $ B16 (fromIntegral (fromIntegral x `div` fromIntegral y :: Int16))
292+ = Just $ B16 (fromIntegral (fromIntegral x `quot` fromIntegral y :: Int16))
293293bsdiv (ITFixed IT32) [B32 x, B32 y]
294− = Just $ B32 (fromIntegral (fromIntegral x `div` fromIntegral y :: Int32))
294+ = Just $ B32 (fromIntegral (fromIntegral x `quot` fromIntegral y :: Int32))
295295bsdiv (ITFixed IT64) [B64 x, B64 y]
296− = Just $ B64 (fromIntegral (fromIntegral x `div` fromIntegral y :: Int64))
297−bsdiv ITNative [I x, I y] = Just $ I (x `div` y)
298−bsdiv ITChar [Ch x, Ch y] = Just $ Ch (chr $ (ord x) `div` (ord y))
296+ = Just $ B64 (fromIntegral (fromIntegral x `quot` fromIntegral y :: Int64))
297+bsdiv ITNative [I x, I y] = Just $ I (x `quot` y)
298+bsdiv ITChar [Ch x, Ch y] = Just $ Ch (chr $ (ord x) `quot` (ord y))
299299bsdiv _ _ = Nothing
300300
301301bashr :: IntTy -> [Const] -> Maybe Const