[MLton-commit] r5590
Vesa Karvonen
vesak at mlton.org
Wed Jun 6 00:43:10 PDT 2007
SML/NJ support.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/random/unstable/detail/mk-random-gen.fun
A mltonlib/trunk/com/ssh/random/unstable/detail/ml/
A mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlton/
A mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlton/random-dev.mlb
A mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlton/random-dev.sml
A mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/
A mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.sml
A mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/unsealed.cm
U mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml
D mltonlib/trunk/com/ssh/random/unstable/detail/random-dev-mlton.sml
U mltonlib/trunk/com/ssh/random/unstable/detail/ranqd1-gen.sml
A mltonlib/trunk/com/ssh/random/unstable/lib.cm
U mltonlib/trunk/com/ssh/random/unstable/lib.mlb
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/random/unstable/detail/mk-random-gen.fun
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/mk-random-gen.fun 2007-06-06 07:16:33 UTC (rev 5589)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/mk-random-gen.fun 2007-06-06 07:43:08 UTC (rev 5590)
@@ -8,6 +8,13 @@
RANDOM_GEN where type RNG.t = RNG.t
where type RNG.Seed.t = RNG.Seed.t =
struct
+ (* <-- SML/NJ workarounds *)
+ open Basic Fn
+ infix 4 <\
+ infixr 4 />
+ infix 1 >>=
+ (* SML/NJ workarounds --> *)
+
structure A = Array and R = Real and V = Vector and W = Word
fun assert th = if th () then () else fail "assertion failed"
Added: mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlton/random-dev.mlb
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlton/random-dev.mlb 2007-06-06 07:16:33 UTC (rev 5589)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlton/random-dev.mlb 2007-06-06 07:43:08 UTC (rev 5590)
@@ -0,0 +1,19 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+local
+ $(MLTON_LIB)/com/ssh/extended-basis/unstable/basis.mlb
+ $(MLTON_ROOT)/basis/mlton.mlb
+in
+ ann
+ "forceUsed"
+ "sequenceNonUnit warn"
+ "warnUnused true"
+ in
+ ../../../public/random-dev.sig
+ random-dev.sml
+ end
+end
Property changes on: mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlton/random-dev.mlb
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlton/random-dev.sml (from rev 5585, mltonlib/trunk/com/ssh/random/unstable/detail/random-dev-mlton.sml)
Added: mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.sml
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.sml 2007-06-06 07:16:33 UTC (rev 5589)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.sml 2007-06-06 07:43:08 UTC (rev 5590)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+structure RandomDev : RANDOM_DEV = struct
+ (* XXX implement reasonable seed/useed for SML/NJ *)
+ fun seed () = raise Fail "not implemented"
+ val useed = seed
+end
Property changes on: mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/unsealed.cm 2007-06-06 07:16:33 UTC (rev 5589)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/unsealed.cm 2007-06-06 07:43:08 UTC (rev 5590)
@@ -0,0 +1,15 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+group is
+ ../../../../../extended-basis/unstable/basis.cm
+ ../../../public/random-dev.sig
+ ../../../public/random-gen.sig
+ ../../../public/rng.sig
+ ../../mk-random-gen.fun
+ ../../numerical-recipes.sml
+ ../../ranqd1-gen.sml
+ random-dev.sml
Modified: mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml 2007-06-06 07:16:33 UTC (rev 5589)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml 2007-06-06 07:43:08 UTC (rev 5590)
@@ -23,6 +23,14 @@
* of the book Numerical Recipes in C.
*)
end = struct
+ (* <-- SML/NJ workarounds *)
+ open Fn
+ infix 7 >> <<
+ infix 6 andb
+ infix 5 xorb
+ infix 4 orb
+ (* SML/NJ workarounds --> *)
+
fun ranqd1 s : Word32.t = s * 0w1664525 + 0w1013904223
val psdes =
Deleted: mltonlib/trunk/com/ssh/random/unstable/detail/random-dev-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/random-dev-mlton.sml 2007-06-06 07:16:33 UTC (rev 5589)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/random-dev-mlton.sml 2007-06-06 07:43:08 UTC (rev 5590)
@@ -1,7 +0,0 @@
-(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
- *
- * This code is released under the MLton license, a BSD-style license.
- * See the LICENSE file or http://mlton.org/License for details.
- *)
-
-structure RandomDev : RANDOM_DEV = MLton.Random
Modified: mltonlib/trunk/com/ssh/random/unstable/detail/ranqd1-gen.sml
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ranqd1-gen.sml 2007-06-06 07:16:33 UTC (rev 5589)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ranqd1-gen.sml 2007-06-06 07:43:08 UTC (rev 5590)
@@ -6,7 +6,11 @@
structure RanQD1Gen :> RANDOM_GEN where type RNG.Seed.t = Word32.t =
MkRandomGen
- (type t = Word32.t
+ ((* <-- SML/NJ workarounds *)
+ open Fn
+ infixr 4 />
+ (* SML/NJ workarounds --> *)
+ type t = Word32.t
structure Seed = Word32
val make = id
val (value, seed) = Iso.<--> (Iso.swap Word.isoLarge, Word32.isoLarge)
Added: mltonlib/trunk/com/ssh/random/unstable/lib.cm
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/lib.cm 2007-06-06 07:16:33 UTC (rev 5589)
+++ mltonlib/trunk/com/ssh/random/unstable/lib.cm 2007-06-06 07:43:08 UTC (rev 5590)
@@ -0,0 +1,12 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+library
+ source(public/export.sml)
+is
+ ../../extended-basis/unstable/basis.cm
+ detail/ml/smlnj/unsealed.cm
+ public/export.sml
Modified: mltonlib/trunk/com/ssh/random/unstable/lib.mlb
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/lib.mlb 2007-06-06 07:16:33 UTC (rev 5589)
+++ mltonlib/trunk/com/ssh/random/unstable/lib.mlb 2007-06-06 07:43:08 UTC (rev 5590)
@@ -21,12 +21,7 @@
detail/numerical-recipes.sml
detail/ranqd1-gen.sml
- public/random-dev.sig
- local
- $(MLTON_ROOT)/basis/mlton.mlb
- in
- detail/random-dev-mlton.sml
- end
+ detail/ml/$(SML_COMPILER)/random-dev.mlb
in
public/export.sml
end
More information about the MLton-commit
mailing list