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

add subst0 to substitute erased equalities in non-erased types #266

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

liesnikov
Copy link
Contributor

No description provided.

@jespercockx
Copy link
Member

The error message from failing CI:

Cannot make function subst0 transparent. A transparent function must have exactly one non-erased argument and return it unchanged.

I guess that you need to make the p argument erased (or implicit, but that isn't as nice).

@flupe
Copy link
Contributor

flupe commented Jan 22, 2024

  • Could you move it to Haskell.Law.Equality?
  • Can you also erase the a argument --- in practice I've found it necessary when using datatypes and records defined as @0.

@liesnikov
Copy link
Contributor Author

We discussed placement with @jespercockx and the reason to put it in Prelude was that subst0 seems closer to coerce than anything in Law.Equality. I don't mind either way but would be good not to move it back the day after 🙃 .

Pushed the update on the erasure of a. Also marked it as implicit, not sure if there's a general policy on this?

@flupe
Copy link
Contributor

flupe commented Jan 22, 2024

The difference being coerce is a function that shows up in Haskell code as a function from Haskell base. subst0 isn't related to anything on the Haskell side, it's a purely Agda-side construct about equality, just like things in Haskell.Law.Equality.

For that matter, I don't think coerce should be named coerce or be in Haskell.Prelude, if our goal is to replicate the Haskell prelude structure.

Even if you end up not putting subst0 in Law.Equality, we should stop putting things in Prelude by default.

@liesnikov
Copy link
Contributor Author

I really really don't mind, if it gets merged faster with it being in Law.Equality I'm happy to put it there.
Pushed the move just now.

@flupe flupe merged commit a618fac into agda:master Jan 23, 2024
7 checks passed
@jespercockx jespercockx added this to the 1.3 milestone Feb 23, 2024
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.

3 participants