-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
AddSetCookies missing an instance for when the left tree is the same before and after the transformation #1601
Comments
If someone more experienced with servant could confirm that this is indeed the case and this instance should exist (and it's not just working by accident) then I'd be happy to do a pull request for this issue. |
is this not solved by this - #1531 ? |
i see well, i'm no expert, but your solution certainly seems reasonable to me :) |
A colleague and I hit this problem with one of our API types and spent a good amount of time looking at the proposed new instance, as well as reading the GHC description of overlapping instance pragmas. I'm pretty sure this is correct, and #1653 is probably not what's wanted. |
@endgame well, I guess that's enough encouragement for me to open a PR then :). I'll try to do it over the weekend. |
Fantastic, thank you both |
#1702 was merged. Should this be closed? |
@endgame I think so |
So, I've got this error
If we look carefully, it's saying that for this type:
It cannot decide if it should use
AddSetCookies ('S n) (m old) (m new)
orAddSetCookies ('S n) (a :<|> b) (a' :<|> b')
.This is because the first branch is the same e.g.
AddSetCookies ('S n) (a:<|>b) (a :<|>b)
and thereforea :<|>
can be interpreted asm
inAddSetCookies ('S n) (m old) (m new)
.It's seems perfectly reasonable to me that the
a
branch can stay the same after theAddSetCookie
transformation. I've written this orphan instance that fixed my issue.The text was updated successfully, but these errors were encountered: