On Dec 8, 2020, at 4:32 AM, Joachim Breitner <mail@joachim-breitner.de> wrote:Would you argue that it should not be included even _if_ we’d include
GADTs and/or TypeFamilies? Or are you saying that MonoLocalBinds
shouldn’t be in; GADTS/TypeFamilies are bad without MonoLocalBinds, and
thus GADTs/TypeFamilies ought to be left out?
On Dec 8, 2020, at 10:36 AM, Eric Seidel <eric@seidel.io> wrote:
Aha, so what you're saying is that with NamedWildCards but not PartialTypeSignatures, GHC will tell you what `_a` was solved for, but it won't accept the resulting program? I didn't realize that NamedWildCards did anything in the absence of PartialTypeSignatures, but I agree that this is better. I was already voting for NamedWildCards, but now I'm inclined to additionally vote against PartialTypeSignatures.
On Dec 8, 2020, at 11:59 AM, Iavor Diatchki <iavor.diatchki@gmail.com> wrote:It seems odd to turn on an extension [NamedWildCards] that doesn't do anything, and it is entirely there to make *another* extension work better? Wouldn't it be better to make `PartialTypeSignatures` imply `NamedWildCards`?
foo :: _a -> _afoo True = Falsefoo False = True
Bug.hs:4:5: error:• Couldn't match expected type ‘_a’ with actual type ‘Bool’‘_a’ is a rigid type variable bound bythe type signature for:foo :: forall _a. _a -> _aat Bug.hs:3:1-15• In the pattern: TrueIn an equation for ‘foo’: foo True = False• Relevant bindings include foo :: _a -> _a (bound at Bug.hs:4:1)
Bug.hs:5:8: error:• Found type wildcard ‘_a’ standing for ‘Bool’To use the inferred type, enable PartialTypeSignatures• In the type signature: foo :: _a -> _a