[MLton-commit] r5630

Vesa Karvonen vesak at mlton.org
Sat Jun 16 04:19:20 PDT 2007


Exposed NumericalRecipes : NUMERICAL_RECIPES, because the utilities are
useful outside the Random library.

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

U   mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/unsealed.cm
U   mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml
U   mltonlib/trunk/com/ssh/random/unstable/lib.mlb
U   mltonlib/trunk/com/ssh/random/unstable/public/export.sml
A   mltonlib/trunk/com/ssh/random/unstable/public/numerical-recipes.sig

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

Modified: mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/unsealed.cm	2007-06-16 10:35:56 UTC (rev 5629)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ml/smlnj/unsealed.cm	2007-06-16 11:19:19 UTC (rev 5630)
@@ -6,6 +6,7 @@
 
 group is
   ../../../../../extended-basis/unstable/basis.cm
+  ../../../public/numerical-recipes.sig
   ../../../public/random-dev.sig
   ../../../public/random-gen.sig
   ../../../public/rng.sig

Modified: mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml	2007-06-16 10:35:56 UTC (rev 5629)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml	2007-06-16 11:19:19 UTC (rev 5630)
@@ -4,25 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-structure NumericalRecipes :> sig
-   val ranqd1 : Word32.t UnOp.t
-   (**
-    * This implements the quick-and-dirty linear congruential pseudo
-    * random number generator described on page 284 of the book Numerical
-    * Recipes in C.  Perhaps the most important feature of this generator
-    * is that it cycles through all 32-bit words.  This is useful if you
-    * want to generate unique 32-bit identifiers.
-    *
-    * Warning: If you need a high-quality pseudo random number generator
-    * for simulation purposes, then this isn't for you.
-    *)
-
-   val psdes : Word32.t Sq.t UnOp.t
-   (**
-    * This implements the "Pseudo-DES" algorithm described in section 7.5
-    * of the book Numerical Recipes in C.
-    *)
-end = struct
+structure NumericalRecipes :> NUMERICAL_RECIPES = struct
    (* <-- SML/NJ workarounds *)
    open TopLevel
    infix  7 >> <<

Modified: mltonlib/trunk/com/ssh/random/unstable/lib.mlb
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/lib.mlb	2007-06-16 10:35:56 UTC (rev 5629)
+++ mltonlib/trunk/com/ssh/random/unstable/lib.mlb	2007-06-16 11:19:19 UTC (rev 5630)
@@ -18,7 +18,9 @@
 
          detail/mk-random-gen.fun
 
+         public/numerical-recipes.sig
          detail/numerical-recipes.sml
+
          detail/ranqd1-gen.sml
 
          detail/ml/$(SML_COMPILER)/random-dev.mlb

Modified: mltonlib/trunk/com/ssh/random/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/public/export.sml	2007-06-16 10:35:56 UTC (rev 5629)
+++ mltonlib/trunk/com/ssh/random/unstable/public/export.sml	2007-06-16 11:19:19 UTC (rev 5630)
@@ -10,6 +10,7 @@
 signature RANDOM_GEN = RANDOM_GEN
 signature RANDOM_DEV = RANDOM_DEV
 
+signature NUMERICAL_RECIPES = NUMERICAL_RECIPES
 
 (** == Exported Structures == *)
 
@@ -19,6 +20,7 @@
 structure RanQD1Gen : RANDOM_GEN where type RNG.Seed.t = Word32.t = RanQD1Gen
 (** A quick-and-dirty random value generator. *)
 
+structure NumericalRecipes : NUMERICAL_RECIPES = NumericalRecipes
 
 (** == Exported Functors == *)
 

Copied: mltonlib/trunk/com/ssh/random/unstable/public/numerical-recipes.sig (from rev 5623, mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml)
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/numerical-recipes.sml	2007-06-15 03:54:58 UTC (rev 5623)
+++ mltonlib/trunk/com/ssh/random/unstable/public/numerical-recipes.sig	2007-06-16 11:19:19 UTC (rev 5630)
@@ -0,0 +1,28 @@
+(* 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.
+ *)
+
+(**
+ * Signature for some utilities from Numerical Recipes in C.
+ *)
+signature NUMERICAL_RECIPES = sig
+   val ranqd1 : Word32.t UnOp.t
+   (**
+    * This implements the quick-and-dirty linear congruential pseudo
+    * random number generator described on page 284 of the book Numerical
+    * Recipes in C.  Perhaps the most important feature of this generator
+    * is that it cycles through all 32-bit words.  This is useful if you
+    * want to generate unique 32-bit identifiers.
+    *
+    * Warning: If you need a high-quality pseudo random number generator
+    * for simulation purposes, then this isn't for you.
+    *)
+
+   val psdes : Word32.t Sq.t UnOp.t
+   (**
+    * This implements the "Pseudo-DES" algorithm described in section 7.5
+    * of the book Numerical Recipes in C.
+    *)
+end




More information about the MLton-commit mailing list