Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ cleanup ] remove duplicate copy of header parsing #3122

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

dunhamsteve
Copy link
Contributor

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 in progHdr, which is used to parse the header for building the module tree and deciding whether to rebuild a file or not. The other is in prog 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 a Module decoration.

Here I keep the copy in progHdr, adding the decoration, and have prog call progHdr and then add the declarations.

@andrevidela
Copy link
Collaborator

omg yesss this has bugged me for years

@gallais gallais merged commit 73507a8 into idris-lang:main Oct 27, 2023
22 checks passed
@dunhamsteve dunhamsteve deleted the parser-progHdr-refactor branch October 28, 2023 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants