summaryrefslogtreecommitdiff
path: root/lib/std/rand.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/rand.myr')
-rw-r--r--lib/std/rand.myr12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/std/rand.myr b/lib/std/rand.myr
index c2a03fd..9cea564 100644
--- a/lib/std/rand.myr
+++ b/lib/std/rand.myr
@@ -13,12 +13,12 @@ pkg std =
const mksrng : (seed : uint32 -> rng#)
const freerng : (rng : rng# -> void)
- generic rand : (lo : @a::(numeric,integral), hi : @a::(numeric,integral) -> @a::(numeric,integral))
- generic randnum : (-> @a::(numeric,integral))
+ generic rand : (lo : @a, hi : @a -> @a) :: numeric,integral @a
+ generic randnum : (-> @a) :: numeric,integral @a
const randbytes : (buf : byte[:] -> void)
- generic rngrand : (rng : rng#, lo : @a::(numeric,integral), hi : @a::(numeric,integral) -> @a::(numeric,integral))
- generic rngrandnum : (rng : rng# -> @a::(numeric,integral))
+ generic rngrand : (rng : rng#, lo : @a, hi : @a -> @a) ::numeric,integral @a
+ generic rngrandnum : (rng : rng# -> @a) :: numeric,integral @a
const rngrandbytes : (rng : rng#, buf : byte[:] -> void)
;;
@@ -90,7 +90,7 @@ designed by David Blackman and Sebastiano Vigna.
See http://xoroshiro.di.unimi.it/ for details.
*/
-generic rngrandnum = {rng -> @a::(numeric,integral)
+generic rngrandnum = {rng -> @a :: numeric,integral @a
var s0, s1, r
s0 = rng.s0
@@ -101,5 +101,5 @@ generic rngrandnum = {rng -> @a::(numeric,integral)
rng.s0 = (s0 << 55 | s0 >> 9) ^ s1 ^ (s1 << 14)
rng.s1 = (s1 << 36 | s1 >> 28)
- -> (r : @a::(numeric,integral))
+ -> (r : @a)
}