
I recommend acceptance too. It's all very fine detail.
The actual diff seems quite large but that's because I encouraged Vlad to
take the opportunity to clarity the rather cryptic sentence in the original
#218, namely "The syntactic descriptions here applying to expressions apply
equally to patterns, though we will continue to discuss only expressions."
Instead it is all spelled out much more explicitly, which is way better.
Indeed spelling it out showed up a dark corner to do with view patterns,
hence the icky stuff Arnaud mentions.
Simon
-
On Mon, 11 Dec 2023 at 09:56, Arnaud Spiwack
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. _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee