X-Git-Url: http://git.joshuawise.com/snipe.git/blobdiff_plain/1144856ba9d6018d9922c6ede7e97779a0fe6373..5c79bb689ab446551bc7ec4497e6c9b75582837e:/top/smlnj-specific.sml diff --git a/top/smlnj-specific.sml b/top/smlnj-specific.sml new file mode 100644 index 0000000..e57cae6 --- /dev/null +++ b/top/smlnj-specific.sml @@ -0,0 +1,12 @@ +signature SUQ = +sig + val Word32_lsh : Word32.word * Word32.word -> Word32.word + val Word32_rsh : Word32.word * Word32.word -> Word32.word +end + +structure Suq :> SUQ = +struct + fun loseBit (x: Word32.word) : word = Word31.fromInt (Word32.toInt x) + fun Word32_lsh (a, b) = Word32.<< (a, loseBit b) + fun Word32_rsh (a, b) = Word32.~>> (a, loseBit b) +end