
On Thu, 17 Dec 2020 at 16:42, Spiwack, Arnaud
On Thu, Dec 17, 2020 at 5:24 PM Simon Marlow marlowsd@gmail.com http://mailto:marlowsd@gmail.com wrote:
In the case of partial type signatures *you can't use the feature without generating a warning*, which is quite a different matter, I think. It would be even stranger if it was an error!
I’m not sure I follow, I can certainly use PartialTypeSignature without generating a warning:
:set -XPartialTypeSignatures :set -Wno-partial-type-signatures f :: _ -> _ ; f = (+) 1
You disabled the warning!
I'm sorry I'm not making this point very well, let me try to clarify. I'm saying that it would be strange to enable PartialTypeSignatures by default *and* leave the warning turned on by default, because it would be impossible to use the feature without generating a warning (unless of course you disable the warning explicitly, but it's silly to have to do that just to use a feature that is enabled by default). It would be fine to leave the extension disabled, or better (in my view) to enable the extension and disable the warning. Cheers Simon
Unless you are saying that the feature *is* the warning. Which is debatable.
If you think that the warning is the feature, though, then you have the same feature without PartialTypeSignature, but as an error instead
f :: _ -> _ ; f = (+) 1
<interactive>:2:6: error: * Found type wildcard `_' standing for `Integer' To use the inferred type, enable PartialTypeSignatures * In the type `_ -> _' In the type signature: f :: _ -> _
<interactive>:2:11: error: * Found type wildcard `_' standing for `Integer' To use the inferred type, enable PartialTypeSignatures * In the type `_ -> _' In the type signature: f :: _ -> _