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

Ordering wrong in instance chain? #1

Closed
bbarker opened this issue Sep 30, 2020 · 5 comments
Closed

Ordering wrong in instance chain? #1

bbarker opened this issue Sep 30, 2020 · 5 comments

Comments

@bbarker
Copy link

bbarker commented Sep 30, 2020

There was some discussion around this, and a couple of people (paluh and paf31 :-)) found that the instance chain order seemed wrong: https://try.purescript.org/?gist=ffb4ebbf07b2feb00563e109f0ccf440&session=1f5015b2-f2f7-ea7d-9702-28da84846303

@acple
Copy link
Owner

acple commented Oct 1, 2020

Oh, I'd like to see the discussion, where did you do?
Ya I suppose current one may still be wrong.

The first instance is intended to match (h a -> h b) -> f (g (h a)) -> f (g (h b)), e.g. example2.
If I omit it, this only match the lowest type.
But I still don't understand why I can't write fundep as fa a b -> fa, fa fb b -> a, fa a b -> fb, fa fb a -> b.

@bbarker
Copy link
Author

bbarker commented Oct 1, 2020 via email

@acple
Copy link
Owner

acple commented Oct 2, 2020

Thank you, I got it.
Simply their discussion doesn't consider about intermediate functor mapping.
And the root issue is: less enough fundeps, as I mentioned beforeabove.
Therefore, type inference doesn't work in some important scenario.

@bbarker
Copy link
Author

bbarker commented Oct 2, 2020 via email

@acple
Copy link
Owner

acple commented Oct 2, 2020

I opened #2, please check it!
Thank you too!

@acple acple closed this as completed Oct 2, 2020
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

2 participants