[ghc-steering-committee] A few more pleas

Spiwack, Arnaud arnaud.spiwack at tweag.io
Wed Dec 9 11:17:55 UTC 2020


On Tue, Dec 8, 2020 at 8:54 PM Richard Eisenberg <rae at richarde.dev> wrote:

> No. If we have GADTs and/or TypeFamilies, then we should absolutely have
> MonoLocalBinds -- GADTs and TypeFamilies are wonky without MonoLocalBinds.
> I'd prefer not to have any of them on by default.
>

Do we agree that this is not tenable in the long term? At some point, GADTs
and TypeFamilies need to be in by default. When is that horizon? For
context, these features have been with us for 12 years (since GHC 6.8.1).
And quite stable in the last 6 years. They are not going anywhere, they are
very widely used.

Just as much, I'd say MonoLocalBinds really wants to be the default
(supporting `NoMonoLocalBinds` at all probably has some non-trivial
implementation costs, I would not be sad to see this go, even if it's a bit
hard to get rid of in the current state because it does mean breaking
compatibility with Haskell98 and Haskell2010, in fact, we still support
`DatatypeContext` at the cost of code).

Maybe GHC2021 shouldn't have these (it's not my opinion, but it's
arguable). Since the value of GHC2021 is “conservatism” (then again, we
seem to be adding in StandaloneKindSignatures and NamedFieldPuns, which do
not sound very conservative to me). But then, they are the first two
extensions that should be considered for GHC2022. Do we agree on this? Or
would you rather see these stay in their standalone extensions forever?
(which I would find, personally, rather alarming)

Exactly, yes. I am strongly against PartialTypeSignatures as an extension,
> as users should have to opt into accepting partially-written programs.
>

How is a partial type signature a partially-written program? Does the
absence of type signature on a binding make a program partially written?
Because a partial type signature is more than no signature at all, so it
should be considered less partial at least.

Plus, partial type signatures give a warning (which, I've argued before, is
probably more than you actually want cf
https://gitlab.haskell.org/ghc/ghc/-/issues/16220).

I don't know that we want PartialTypeSignature this time around. And there
may be reason to never want them. But I'd say “users should have to opt
into accepting partially-written programs” is not one of them.

With NamedWildCards, we get
>
> 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
>
>
> I think that prefixing a variable name with an underscore is a convenient,
> lightweight way of asking GHC to tell me what a type should be.
>
>
On the other hand, I think that I agree with this, and that I will change
my vote.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20201209/9cf95785/attachment.html>


More information about the ghc-steering-committee mailing list