oh dear! i think i know what happened. self_init has never been called in the first place! it requires a unit argument which i did not give it, so the “alias” to Random.self_init was assigned to nothing, so to speak, instead of calling the function.
Many thanks, Dmitry! I’ve amended that line to let () = Random.self_init () and it works.
On 21 May 2014, at 13:18, Dmitry Grebeniuk <gdsfh1@gmail.com> wrote:
> Hello.
>
>> let _ = Random.self_init
>
> That's why I almost never use "let _ = ...", or
> constrain "_" to some type when I use it.
> Try to replace it with "let () = ..." and follow compiler
> errors. Or with "let (_ : unit) = ...".
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs