]> Joshua Wise's Git repositories - snipe.git/blobdiff - top/smlnj-specific.sml
Initial import of l5c
[snipe.git] / top / smlnj-specific.sml
diff --git a/top/smlnj-specific.sml b/top/smlnj-specific.sml
new file mode 100644 (file)
index 0000000..e57cae6
--- /dev/null
@@ -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
This page took 0.022265 seconds and 4 git commands to generate.