Return partially parsed module in case parse fails when using readModule.
What does this MR do?
Return partially parsed module in case parse fails when using readModule.
Changes to public APIs
The type of readModule changed from:
readModule :: !FilePath !*World -> *(!MaybeError String (ParsedModule, HashTable), !*World)
to
readModule :: !FilePath !*World -> *(!MaybeError (String, ?(ParsedModule, HashTable)) (ParsedModule, HashTable), !*World).
To update, either use the new information provided by the ?(ParsedModule, HashTable) in case of an error, or ignore it.
The reason for requesting to merge this change is due to the eastwood linter using the ParsedModule information in case of a parse error (https://gitlab.com/top-software/eastwood/-/jobs/7348393727). This used to return Ok (ParsedModule, ...) but since it returns Error String now, the ParsedModule information is lost and the error the linter returns is less accurate than it was before, as the failing test in the pipeline shows.
Author's checklist (required)
-
If bugs have been solved, tests have been added (guidelines) -
A changelog entry has been added (guidelines) -
Newly added code is documented (guidelines) -
Newly added code has a style consistent with the rest of the repository -
Intermediate commits compile (use git rebase -i mainif not)