[MLton-commit] r5983
Vesa Karvonen
vesak at mlton.org
Sat Sep 1 03:12:11 PDT 2007
Allow seed to specified on the command line.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/unit-test/unstable/detail/mk-unit-test.fun
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/unit-test/unstable/detail/mk-unit-test.fun
===================================================================
--- mltonlib/trunk/com/ssh/unit-test/unstable/detail/mk-unit-test.fun 2007-08-31 23:29:39 UTC (rev 5982)
+++ mltonlib/trunk/com/ssh/unit-test/unstable/detail/mk-unit-test.fun 2007-09-01 10:12:10 UTC (rev 5983)
@@ -183,7 +183,14 @@
fun maxSkip ? = mk #skipM ?
end
- val rng = ref (G.RNG.make (G.RNG.Seed.fromWord (getOpt (RandomDev.seed (), 0w0))))
+ val rng = ref (G.RNG.make (G.RNG.Seed.fromWord let
+ open Maybe
+ val W = Word.fromString
+ in
+ getOpt (get (Monad.sum [S"-s"@`W, L"--seed"@`W,
+ mk RandomDev.seed ()]),
+ 0w0)
+ end))
fun sort ? = SortedList.stableSort #n ?
More information about the MLton-commit
mailing list