[ghc-steering-committee] Proposal: Or patterns #43 (Round 2)

Manuel M T Chakravarty chak at justtesting.org
Tue Jun 19 02:17:07 UTC 2018


Let’s consolidate the discussion of Proposal #43 in this current thread about the revised proposal. And for reference, here is SimonPJ’s recent message posted in the old thread:



SimonPJ’s message got support from Iavor and Richard, and SimonM previously expressed support on this Round 2 thread.

In the meantime, the proposal has also been changed to use ’;’ as a separator (instead of the initially proposed ’|’). However, this still leaves us with

  https://github.com/ghc-proposals/ghc-proposals/pull/43#issuecomment-398086013 <https://github.com/ghc-proposals/ghc-proposals/pull/43#issuecomment-398086013>

where the proposal author writes that he will update the proposal with new typing rules along SimonPJ’s suggestions within a few weeks.

Hence, it seems to me that we need to wait with a formal decision until that update of the typing rules has happened. Do you agree, Simon?

In any case, is anybody unhappy with any aspect other than ”what would and would not typecheck” (which will hopefully be addressed in those forthcoming typing rules)? If so, please speak now.

Cheers,
Manuel

> 01.06.2018 17:30 Manuel M T Chakravarty <chak at justtesting.org>:
> 
> We now have a revised version of the ”Or pattern” proposal #43 to consider:
> 
>  (formatted) https://github.com/osa1/ghc-proposals/blob/or_patterns/proposals/0000-or- <https://github.com/osa1/ghc-proposals/blob/or_patterns/proposals/0000-or->patterns.rst
>  (PR thread) https://github.com/ghc-proposals/ghc-proposals/pull/43
> 
> You may remember that we discuss this a while back
> 
>   https://mail.haskell.org/pipermail/ghc-steering-committee/2017-November/000231.html <https://mail.haskell.org/pipermail/ghc-steering-committee/2017-November/000231.html>
> 
> and finally decided to bounce it back to the authors with the following recommendation:
> 
>   https://github.com/ghc-proposals/ghc-proposals/pull/43#issuecomment-358189327 <https://github.com/ghc-proposals/ghc-proposals/pull/43#issuecomment-358189327>
> 
> We previously decided that we are inclined to accept this proposal if the authors change the points that we highlighted. Judging from the conversation of SimonPJ and Richard with the author on the GitHub thread, it appears to me that most of the issues have been addressed. However, Simon’s point
> 
> 	• "Patterns that bind existentials, dictionaries, or equalities are rejected by the type checker". I disagree. Earlier I suggested "no variable bound by an or-pattern can have a type that mentions an existential variable bound by the or-pattern". That is much more friendly because you can still match against an existential constructor; you just can’t bind an existential variable.
> 
> from <https://github.com/ghc-proposals/ghc-proposals/pull/43#issuecomment-368933401 <https://github.com/ghc-proposals/ghc-proposals/pull/43#issuecomment-368933401>> still doesn’t seem to be addressed, or am I misunderstanding?
> 
> Overall, I propose to accept the proposal, possibly requiring that the above point be addressed.
> 
> What do you all think?
> 
> Cheers,
> Manuel
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20180619/00afe794/attachment-0002.html>
-------------- next part --------------
An embedded message was scrubbed...
From: Simon Peyton Jones <simonpj at microsoft.com>
Subject: RE: [ghc-steering-committee] Proposal: Or patterns (#43)
Date: Mon, 18 Jun 2018 13:02:04 +0000
Size: 16392
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20180619/00afe794/attachment-0001.eml>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20180619/00afe794/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 874 bytes
Desc: Message signed with OpenPGP
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20180619/00afe794/attachment-0001.sig>


More information about the ghc-steering-committee mailing list