Open david-christiansen opened 9 years ago
Hm, this seems like a straightforward modification to how main.sml
handles failure (at least I think?). If I'm correct I can do this :)
@jozefg Possibly... But if an operator is defined after an unfinished theorem, it won't show up I think. So we may need to have a mode in which we run a development, but don't actually try to ensure that theorems are evident.
@jonsterling Oh I see, because the exception will cause it to bail out.. Though it might be interesting to consider processing the development AST right away and delay proving things until afterwards.
EDIT: perhaps I shouldn't be so hasty. Looking at the code now it would seem that it's possible but might require us to hang on to a lot of development environment's as we process a file which could be troubling memory wise..
Right now, --list-operators only works on comlete developments. Now that Emacs uses the output for completion and highlighting, this means that the state the file was opened in has a big impact on user experience. If it could print arities for files that are syntactically valid but incomplete, that would make the highlighting much better.
As an easier alternative, it could also print the operators defined up to the point where the first incomplete theorem is found.