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

Incorrect compilation of type synonyms #309

Closed
flupe opened this issue Mar 26, 2024 · 1 comment · Fixed by #329
Closed

Incorrect compilation of type synonyms #309

flupe opened this issue Mar 26, 2024 · 1 comment · Fixed by #329
Assignees
Labels
bug Something isn't working
Milestone

Comments

@flupe
Copy link
Contributor

flupe commented Mar 26, 2024

Bug reported by @liesnikov.

private variable @0 a : Set

Ap : (p : @0 a  Set)  @0 a  Set
Ap p x = p x
{-# COMPILE AGDA2HS Ap #-}

Expected output:

type Ap p = p

Actual output:

type Ap x = p
@flupe flupe added the bug Something isn't working label Mar 26, 2024
@VictorCMiraldo
Copy link
Contributor

This seems to be happening here:

as <- compileTypeArgs defType namedClausePats

The namedClausePats has both arguments, but the compileDom of the first argument returns DODropped, causing it to be ignored by the compileTypeArgs, whereas it should select the other variable to be DODrpped.

@jespercockx jespercockx added this to the 1.3 milestone Jun 8, 2024
VictorCMiraldo added a commit to VictorCMiraldo/agda2hs that referenced this issue Jun 8, 2024
VictorCMiraldo added a commit to VictorCMiraldo/agda2hs that referenced this issue Jun 8, 2024
VictorCMiraldo added a commit to VictorCMiraldo/agda2hs that referenced this issue Jun 9, 2024
VictorCMiraldo added a commit to VictorCMiraldo/agda2hs that referenced this issue Jun 9, 2024
jespercockx pushed a commit that referenced this issue Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants