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 existing-class for postulated type classes #373

Open
flupe opened this issue Oct 1, 2024 · 0 comments
Open

Allow existing-class for postulated type classes #373

flupe opened this issue Oct 1, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@flupe
Copy link
Contributor

flupe commented Oct 1, 2024

We should enable the existing-class pragma for postulated type classes:

postulate
  MyShow : Set -> Set
  myshow : {{ MyShow a }} -> a -> String
{-# COMPILE MyShow existing-class #-}

ok : {{ MyShow a }} -> a -> String
ok = myshow

Currently MyShow is not considered a class (since #284), and thus the instance arguments get turned into regular Haskell arguments and not class constraints:

ok : MyShow a -> a -> String
ok x = myshow x
flupe added a commit to flupe/agda2hs that referenced this issue Oct 1, 2024
flupe added a commit to flupe/agda2hs that referenced this issue Oct 1, 2024
@jespercockx jespercockx added this to the 1.4 milestone Oct 3, 2024
@jespercockx jespercockx added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Nov 1, 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

No branches or pull requests

2 participants