-
Notifications
You must be signed in to change notification settings - Fork 13
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
TestEquality dangerous for value equality (e.g. MapF) #63
Comments
Thanks for the bug report. |
That works, thanks. |
Just chiming in to say that this thread is the only place I've found confirmation of the contracts here (e.g. for use in
|
I'm going to close this issue because I documented our requirements in |
Please check out haskell/core-libraries-committee#21 where the CLC is learning towards an interpretation of Note it would be easy to just modify the laws from |
See also #62. If you want to use the classes from https://hackage.haskell.org/package/some instead, this would de-duplicate the ecosystem and also side-step the issue. |
From the docs, http://hackage.haskell.org/package/base-4.12.0.0/docs/Data-Type-Equality.html#t:TestEquality:
This doesn't specify whether the terms themselves should be equal. (Or "deemed equal", if there is no
forall a. (Eq (f a))
. This can lead toMapF
behaving surprisingly to the user. Either changing the docs in base or making a new class (as we conservatively have done with our http://hackage.haskell.org/package/dependent-sum-0.6.2.0/docs/Data-GADT-Compare.html#t:GEq) solve the problem. I'm not sure which is better.The text was updated successfully, but these errors were encountered: