File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
unison-runtime/src/Unison/Runtime/Foreign
unison-src/transcripts/idempotent Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1123,7 +1123,7 @@ foreignCallHelper = \case
1123
1123
Integer_ge -> mkForeign $ \ (l :: Integer , r :: Integer ) -> pure $ encodeVal (l >= r)
1124
1124
Integer_neg -> mkForeign $ \ (n :: Integer ) -> pure $ encodeVal (- n)
1125
1125
Integer_abs -> mkForeign $ \ (n :: Integer ) -> pure $ encodeVal (abs n)
1126
- Integer_signum -> mkForeign $ \ (n :: Integer ) -> pure $ encodeVal (signum n)
1126
+ Integer_signum -> mkForeign $ \ (n :: Integer ) -> pure $ encodeVal (fromIntegral ( signum n) :: Int )
1127
1127
Integer_toFloat -> mkForeign $ \ (n :: Integer ) -> pure $ encodeVal (fromIntegral n :: Double )
1128
1128
Natural_unsafeFromText -> mkForeign $ \ (txt :: Text ) -> case readMaybe (unpack txt) of
1129
1129
Just n -> pure $ encodeVal (n :: Natural )
Original file line number Diff line number Diff line change @@ -252,7 +252,8 @@ test> Integer.tests.arithmetic =
252
252
Integer.eq (Integer.fromInt +1000) (Integer.fromInt +1000),
253
253
not (Integer.eq (Integer.fromInt +1000) (Integer.fromInt +999)),
254
254
eq (Integer.abs (Integer.fromInt +1000)) (Integer.fromInt +1000),
255
- eq (Integer.abs (Integer.fromInt -1000)) (Integer.fromInt +1000)
255
+ eq (Integer.abs (Integer.fromInt -1000)) (Integer.fromInt +1000),
256
+ not (Int.eq (Integer.signum (Integer.fromInt +1)) (Integer.signum (Integer.fromInt -1)))
256
257
]
257
258
258
259
test> Integer.tests.bitwise =
You can’t perform that action at this time.
0 commit comments