[MLton-commit] r6032
Vesa Karvonen
vesak at mlton.org
Wed Sep 19 00:39:02 PDT 2007
Simpler conversions.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/random/unstable/detail/ranqd1-gen.sml
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/random/unstable/detail/ranqd1-gen.sml
===================================================================
--- mltonlib/trunk/com/ssh/random/unstable/detail/ranqd1-gen.sml 2007-09-18 15:18:53 UTC (rev 6031)
+++ mltonlib/trunk/com/ssh/random/unstable/detail/ranqd1-gen.sml 2007-09-19 07:39:01 UTC (rev 6032)
@@ -10,10 +10,10 @@
open TopLevel
infixr 4 />
(* SML/NJ workarounds --> *)
- type t = Word32.t
structure Seed = Word32
+ type t = Seed.t
val make = id
- val (value, seed) = Iso.<--> (Iso.swap Word.isoLarge, Word32.isoLarge)
+ val value = Seed.toWord
val next = NumericalRecipes.ranqd1
- fun split w = #2 o NumericalRecipes.psdes /> seed w
- val maxValue = value Word32.maxValue)
+ fun split w = #2 o NumericalRecipes.psdes /> Seed.fromWord w
+ val maxValue = Seed.toWord Seed.maxValue)
More information about the MLton-commit
mailing list