[ cleanup ] remove duplicate copy of header parsing #3122
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes a duplicate copy of the header parser. (This was discussed in #3068)
There are two copies of the parser code for the file header in
Parser.idr
. One is inprogHdr
, which is used to parse the header for building the module tree and deciding whether to rebuild a file or not. The other is inprog
which is used to parse the entire.idr
file. Because there are two copies, they could accidentally diverge from each other. This has already happened, but currently the only difference is aModule
decoration.Here I keep the copy in
progHdr
, adding the decoration, and haveprog
callprogHdr
and then add the declarations.