Skip to content

Commit e0d7132

Browse files
committed
Keep ints in the range of int32
1 parent 8dcdb25 commit e0d7132

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Data/Int.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ foreign import intAdd
4545
"""
4646
function intAdd(x) {
4747
return function(y) {
48-
return x + y;
48+
return (x + y)|0;
4949
};
5050
}
5151
""" :: Int -> Int -> Int
@@ -54,7 +54,7 @@ foreign import intMul
5454
"""
5555
function intMul(x) {
5656
return function(y) {
57-
return x * y;
57+
return (x * y)|0;
5858
};
5959
}
6060
""" :: Int -> Int -> Int
@@ -81,7 +81,7 @@ foreign import intSub
8181
"""
8282
function intSub(x) {
8383
return function(y) {
84-
return x - y;
84+
return (x - y)|0;
8585
};
8686
}
8787
""" :: Int -> Int -> Int

0 commit comments

Comments
 (0)