let prng_of_random_seed = function None -> Random.State.make_self_init () | Some i -> Random.State.make [|i|]