[MLton-commit] r6135

Vesa Karvonen vesak at mlton.org
Wed Nov 7 17:27:33 PST 2007


Refactoring and use file for Poly/ML.

----------------------------------------------------------------------

A   mltonlib/trunk/com/ssh/random/unstable/detail/ml/common/
A   mltonlib/trunk/com/ssh/random/unstable/detail/ml/common/random-dev.sml
U   mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.mlb
D   mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.sml
A   mltonlib/trunk/com/ssh/random/unstable/detail/ml/polyml/
A   mltonlib/trunk/com/ssh/random/unstable/detail/ml/polyml/random-dev.use
D   mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.sml
U   mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.use
U   mltonlib/trunk/com/ssh/random/unstable/lib.use

----------------------------------------------------------------------

Copied: mltonlib/trunk/com/ssh/random/unstable/detail/ml/common/random-dev.sml (from rev 6130, mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.sml)
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.sml	2007-11-07 14:14:07 UTC (rev 6130)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/common/random-dev.sml	2007-11-08 01:27:32 UTC (rev 6135)
@@ -0,0 +1,17 @@
+(* 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
+   val cnt = ref 0w0
+   fun seed () =
+       SOME (Word.xorb
+                (Word.fromLargeInt
+                    (Time.toMicroseconds (Time.now ()) mod
+                     Word.toLargeInt Word.maxValue),
+                 !cnt)
+             before cnt := !cnt + 0w1)
+   val useed = seed
+end

Modified: mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.mlb
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.mlb	2007-11-08 01:09:37 UTC (rev 6134)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.mlb	2007-11-08 01:27:32 UTC (rev 6135)
@@ -13,6 +13,6 @@
       "warnUnused true"
    in
       ../../../public/random-dev.sig
-      random-dev.sml
+      ../common/random-dev.sml (* XXX implement better seed/useed for MLKit *)
    end
 end

Deleted: mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.sml
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.sml	2007-11-08 01:09:37 UTC (rev 6134)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/mlkit/random-dev.sml	2007-11-08 01:27:32 UTC (rev 6135)
@@ -1,18 +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 = struct
-   (* XXX implement better seed/useed for MLKit *)
-   val cnt = ref 0w0
-   fun seed () =
-       SOME (Word.xorb
-                (Word.fromLargeInt
-                    (Time.toMicroseconds (Time.now ()) mod
-                     Word.toLargeInt Word.maxValue),
-                 !cnt)
-             before cnt := !cnt + 0w1)
-   val useed = seed
-end

Copied: mltonlib/trunk/com/ssh/random/unstable/detail/ml/polyml/random-dev.use (from rev 6134, mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.use)
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.use	2007-11-08 01:09:37 UTC (rev 6134)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/polyml/random-dev.use	2007-11-08 01:27:32 UTC (rev 6135)
@@ -0,0 +1,8 @@
+(* Copyright (C) 2007 Vesa Karvonen
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(* XXX implement better seed/useed for Poly/ML *)
+use "detail/ml/common/random-dev.sml" ;

Deleted: 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-11-08 01:09:37 UTC (rev 6134)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.sml	2007-11-08 01:27:32 UTC (rev 6135)
@@ -1,18 +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 = struct
-   (* XXX implement better seed/useed for SML/NJ *)
-   val cnt = ref 0w0
-   fun seed () =
-       SOME (Word.xorb
-                (Word.fromLargeInt
-                    (Time.toNanoseconds (Time.now ()) mod
-                     Word.toLargeInt Word.maxValue),
-                 !cnt)
-             before cnt := !cnt + 0w1)
-   val useed = seed
-end

Modified: mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.use
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.use	2007-11-08 01:09:37 UTC (rev 6134)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/random-dev.use	2007-11-08 01:27:32 UTC (rev 6135)
@@ -4,5 +4,5 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-use "public/random-dev.sig" ;
-use "detail/ml/smlnj/random-dev.sml" ;
+(* XXX implement better seed/useed for SML/NJ *)
+use "detail/ml/common/random-dev.sml" ;

Modified: mltonlib/trunk/com/ssh/random/unstable/lib.use
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/lib.use	2007-11-08 01:09:37 UTC (rev 6134)
+++ mltonlib/trunk/com/ssh/random/unstable/lib.use	2007-11-08 01:27:32 UTC (rev 6135)
@@ -11,5 +11,6 @@
              "public/numerical-recipes.sig",
              "detail/numerical-recipes.sml",
              "detail/ranqd1-gen.sml",
+             "public/random-dev.sig",
              "detail/ml/$(SML_COMPILER)/random-dev.use",
              "public/export.sml"]} ;




More information about the MLton-commit mailing list