lean4-htt/tests/bench/parser.lean
Sebastian Ullrich 8f67db0101 refactor: never implicitly ignore monadic results
Also change `do e; f` to desugar to `e *> f` so that it is affected as well
2020-04-23 11:09:59 -07:00

9 lines
241 B
Text

import Init.Lean.Parser
def main : List String → IO Unit
| [fname, n] => do
env ← Lean.mkEmptyEnvironment;
n.toNat!.forM $ fun _ =>
discard $ Lean.Parser.parseFile env fname;
pure ()
| _ => throw $ IO.userError "give file"