mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-14 11:16:33 +03:00
07da2018b7
The `random` primitive previously took a `[32]` seed, but this causes inconsistency between 32-bit and 64-bit platforms when the seed is large enough to wrap around in GHC's representation of an `Int`. This patch switches to an API that seeds directly with four 64-bit words, and so should behave the same way on our supported platforms.
7 lines
203 B
Plaintext
7 lines
203 B
Plaintext
random 120 : [32]
|
|
random 42 : [inf][64]
|
|
random 5 : [16][32][8]
|
|
random 120 : ([32],[16])
|
|
random 42 : { x : [32], y : [16] }
|
|
(random 5 : [32] -> [32]) 5
|
|
random (random 120 : [256]) : [256] |