Mentions légales du service

Skip to content

command-line interface: compile files after parsing all options

SCHERER Gabriel requested to merge gscherer/heptagon:cli-unordered into master

This works:

$ heptc -i test.ept
val fortytwo returns (x : int :: .)

but before this PR, putting -i after the input file does not work (no output):

$ heptc test.ept -i

Putting -i after the file now works are presumably expected.

Note that this may change behavior if people interleave input files with contradictory compiler options. For example before this PR one could use

$ heptc -old-scheduler foo.ept -simple-scheduler bar.ept

and after this PR they will both be compiled using the simple scheduler only -- arguably a counter-intuitive and worse behavior than today.

A follow-up change would be to make the option parsing code slightly more complex to fail when incompatible options are set; the example above would then fail instead of behaving in a weird way.

Merge request reports

Loading