Impossible to reload the ide after parsing error
In master, when starting the IDE on a malformed .mlw (having a syntax error: I tried an lident in module name) and then reloading it, I fall in an assert failure from Typing.open_file. I think the reason for this behavior is that when I get the parsing error, the "typing file Stack" is never closed through Typing.close_file: it is normally called in parser.mly on rule "mlw_file". I suggest replacing the following code in lexer.mll:
let mm = Loc.with_location (mlw_file token) lb in
with something along the lines of:
let mm = try Loc.with_location (mlw_file token) lb with | e -> ignore (Typing.close_file ()); raise e in
so that the stack is "cleared" even when a parsing error is raised.
I am not sure this is the way you would like to solve this problem: thats why I opened an issue.