Skip to content

[ fix ] Process PiInfo in convert and unify #3541

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

Merged
merged 6 commits into from
May 22, 2025

Conversation

spcfox
Copy link
Contributor

@spcfox spcfox commented Apr 23, 2025

Description

Now convert and unify do not compare PiInfo. As a result, the following code compiles successfully:

data X : Type -> Type

data X : Type => Type where
plus : Int -> {n : Int} -> Int
plus = (+)

This PR adds PiInfo processing to both functions. Also, due to unification, it allows resolve metavariables in default values (see DefaultHole.idr).

In additional to this, I changed AlreadyDefined to CantConvert when data is declared and defined with different types.

Should this change go in the CHANGELOG?

  • If this is a fix, user-facing change, a compiler change, or a new paper
    implementation, I have updated CHANGELOG_NEXT.md (and potentially also
    CONTRIBUTORS.md).

@buzden buzden self-requested a review April 24, 2025 12:14
@buzden buzden merged commit 68d1340 into idris-lang:main May 22, 2025
40 of 41 checks passed
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.

2 participants