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

allow erased module arguments #229

Merged
merged 2 commits into from
Nov 28, 2023
Merged

allow erased module arguments #229

merged 2 commits into from
Nov 28, 2023

Conversation

flupe
Copy link
Contributor

@flupe flupe commented Nov 14, 2023

Closes #222.

Also fixes #223 by throwing a hard error when a function gets no compiled clauses.

We now only add scoped type variables for definitions in modules that are not top-level, but they still get quantified over the parameters of the top-level module. Could be convenient, could be annoying, remains to be seen which behavior is the one we want.

This PR only officially supports erased parameters, or explicit sort parameters. Some other may be allowed but we don't have special checks I think (yet).

@flupe flupe marked this pull request as ready for review November 14, 2023 16:11
@flupe
Copy link
Contributor Author

flupe commented Nov 14, 2023

Known bug: opening such a module in another file will generate a qualified import statement, even though the definitions are not actually qualified in the generated Haskell code.

@flupe
Copy link
Contributor Author

flupe commented Nov 16, 2023

I fixed the bug with module application. The output Haskell overly qualifies module applications, but Agda's prettyprinter does the same, so let's worry about it later.

@flupe
Copy link
Contributor Author

flupe commented Nov 24, 2023

forgot to stage my new test file, hence the build failure...

@jespercockx
Copy link
Member

@flupe could you please resolve the conflicts in this PR so it can be included in 1.2?

@jespercockx jespercockx added this to the 1.2 milestone Nov 27, 2023
@flupe
Copy link
Contributor Author

flupe commented Nov 27, 2023

Done!

@jespercockx jespercockx merged commit ff7ad5c into agda:master Nov 28, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Functions defined with an absurd pattern get no definition in Haskell Allow erased module parameters
2 participants