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

Type error using makeEqF when OverloadedLists is enabled #22

Open
patrickt opened this issue Dec 31, 2016 · 0 comments
Open

Type error using makeEqF when OverloadedLists is enabled #22

patrickt opened this issue Dec 31, 2016 · 0 comments

Comments

@patrickt
Copy link

When -XOverloadedLists is on, the invocation of makeEqF in the following code fails to typecheck:

data Expr a
  = Lit Int
  | Paren a

derive [makeEqF] [''Expr]

with the following error:

    • Couldn't match expected type ‘GHC.Exts.Item (t0 Bool)’
                  with actual type ‘Bool’
      The type variable ‘t0’ is ambiguous
    • In the expression: (x_a6uN == y_a6uO)
      In the first argument of ‘and’, namely ‘[(x_a6uN == y_a6uO)]’
      In the expression: and [(x_a6uN == y_a6uO)]

The workaround is trivial (turn off OverloadedLists), but if this is a fixable issue, it would be nice to have. If not, I'd be happy to file a documentation bug adding this caveat to the makeEqF docstring.

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

No branches or pull requests

1 participant