Skip to content

Conversation

@23Skidoo
Copy link
Member

@23Skidoo 23Skidoo commented Aug 3, 2018

The warning was:

• The constraint ‘ToJSON WriteJSON (Signed a)’ matches an instance declaration instance (Monad m, ToJSON m a) => ToJSON m (Signed a) -- Defined in ‘hackage-security-0.5.3.0:Hackage.Security.TUF.Signed’ This makes type inference for inner bindings fragile; either use MonoLocalBinds, or simplify it using the instance 

Fixed by simplifying using the instance.

The warning was: • The constraint ‘ToJSON WriteJSON (Signed a)’ matches an instance declaration instance (Monad m, ToJSON m a) => ToJSON m (Signed a) -- Defined in ‘hackage-security-0.5.3.0:Hackage.Security.TUF.Signed’ This makes type inference for inner bindings fragile; either use MonoLocalBinds, or simplify it using the instance Fixed by simplifying using the instance.
@hvr hvr requested a review from edsko August 4, 2018 09:27
@hvr
Copy link
Member

hvr commented Aug 4, 2018

I'm not sure this is a proper fix; I'd like to hear from @edsko what his type-safety intention was here...

Copy link
Contributor

@edsko edsko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't quite understand the rationale behind this warning, but I think this fix is fine.

@hvr hvr merged commit b99af92 into haskell:master Aug 6, 2018
@hvr
Copy link
Member

hvr commented Aug 6, 2018

Alright, thanks! :-)

@23Skidoo 23Skidoo deleted the hackage-repo-tool-warning branch August 6, 2018 10:20
@bgamari
Copy link
Contributor

bgamari commented Aug 6, 2018

For the record, the motivation for this warning is described in Note [Instance and Given overlap] in TcInteract and Note [Simplifiable given constraints] in TcValidity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants