Re: InstanceSigs -- rationale for the "must be more polymorphic than"

If you would like to offer a patch for the user manual to explain this better, that would be great.
Thank you Simon for the invitation. On further investigation https://gitlab.haskell.org/ghc/ghc/-/issues/20357, what I'd like the user manual to say is: "InstanceSigs is a mis-feature. Don't use it. It is less confusing to just give no signature at all. If you really, really want to bind tyvars, use PatternSignatures."

On 18 Sep 2021, at 04:29, Anthony Clayden
wrote: "InstanceSigs is a mis-feature. Don't use it. It is less confusing to just give no signature at all. If you really, really want to bind tyvars, use PatternSignatures."
I would strongly disagree with this statement. I think instance signatures are a perfectly fine feature for the very simple case of "I want type signatures on my bindings, because I've got better stuff to do than memorising signatures or doing type inference in my head." Does that mean they are superfluous, as your initial email suggests? Well, kinda, in the same way that "adding type signatures to top level bindings" is *technically* superfluous, but I still have those on all my top level bindings. Characterising the extension as a miss-feature in the user guide seems weird for a perfectly usable and useful extension. Cheers, Merijn
participants (2)
-
Anthony Clayden
-
Merijn Verstraaten