[ghc-steering-committee] #626: Amendment of Visible Forall in Types, recommendation: Accept

Arnaud Spiwack arnaud.spiwack at tweag.io
Mon Dec 11 09:55:25 UTC 2023


Dear all,

Vlad is proposing to amend his own proposal
https://github.com/ghc-proposals/ghc-proposals/pull/626

Being an amendment, it's, as always, not as straightforward to consume, but
Vlad gives us a good summary of the changes in his pull-request description.

All in all, it's almost entirely straightforward clarification. There are
two items of notice: patterns for visible forall arguments were specified
as: only variable or wildcard. The amendment changes it to allow data
constructors applied to (0 or more) patterns as well. The amended version
is consistent with how patterns for invisible forall arguments are
specified. The second, and this one is for Moritz, is a small change in the
parsing of view patterns (it does break two packages at least on Hackage,
but I actually don't quite understand how the change can affect semantics.
It's that tiny. Vlad proposes 3 releases with warning before effecting the
change).

Maybe there's a third item: `p -> q` parses differently depending on
whether ViewPattern or RequiredTypeArguments (or both) is turned on. This
is kind of icky, I suppose. But in the case where both are on, then
ViewPattern wins, so there's no real harm in it.

Do pay some attention to the new items in the alternatives section.

Anyway, I recommend we accept.

-- 
Arnaud Spiwack
Director, Research at https://moduscreate.com and https://tweag.io.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20231211/044ea5a1/attachment.html>


More information about the ghc-steering-committee mailing list