Commit graph

3 commits

Author SHA1 Message Date
Leonardo de Moura
ac13f8b0f9 feat(library/system/io): add random number generator support in the io monad
@aqjune @nunoplopes: See new tests at tests/lean/run/random.lean

We have two actions in `io`. By default, `io` uses the C++
random number generator, but we can force it to use a `std_gen` with
the action `set_rand_gen`.

def rand (lo : nat := std_range.1) (hi : nat := std_range.2) : io nat
def set_rand_gen : std_gen → io unit
2018-02-15 16:12:08 -08:00
Sebastian Ullrich
b3262d53b4 feat(frontends/lean/elaborator): structure notation: fall back to inferring superclasses 2018-02-02 08:58:53 -08:00
Leonardo de Moura
0ad5497462 refactor(library/io): make io easier to extend and use 2018-01-23 15:03:31 -08:00