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

Convert pack unpack failure #86

Closed

Conversation

philderbeast
Copy link
Collaborator

Reproduction of the failure:

Couldn't match type: Data.UnitsOfMeasure.Internal.Pack (Data.UnitsOfMeasure.Internal.Unpack (Base "m")) with: Base "m"

@adamgundry
Copy link
Owner

Thanks for the reproducer. I think I see roughly what is going on. The problem is that the plugin sees a flattened wanted constraint Pack (Unpack fsk) ~ fsk along with the given fsk ~ Base "m". It turns the given into a substitution and applies it to the normalised wanted, but doesn't apply the substitution under the Pack type family (which becomes an inert FamAtom).

This is fixed again in 9.2, because of the removal of flattening. With a bit of thought it might be possible to fix on earlier versions too, but I'm out of time for now.

@adamgundry
Copy link
Owner

Thanks for the report! I've incorporated the test case into #93, and raised #94 to track remaining related issues, so I'll close this.

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.

2 participants