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

Solver is too weak to solve wd constraints #44

Open
fxdpntthm opened this issue May 31, 2022 · 0 comments
Open

Solver is too weak to solve wd constraints #44

fxdpntthm opened this issue May 31, 2022 · 0 comments

Comments

@fxdpntthm
Copy link
Collaborator

fxdpntthm commented May 31, 2022

consider

data m @ a => T m a = {.. }

and a top level definition

qqqq :: T m a -> ... 
qqqq (T f) = ...

now we have the following equations:

T @ m ~ ()
T m @ a ~ m @ a

Use of T will give rise to a m @ a constraint and elaboration of T m a will give us T @ m, T m @ a
however GHC solver is not smart enough to figure out that m @ a can be solved using T m @ a
This means we need to give an explicit v @ a constraint in qqqq for it to typecheck

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