[ghc-steering-committee] Proposal #302: Multiway lambda: time to vote

Simon Peyton Jones simonpj at microsoft.com
Thu Jul 22 15:34:11 UTC 2021


|  > 2. (2) and (4) seem to lose \case{}, which is useful in practice. Am I
|  > correct in saying that we'll lose \case{}?
|  >
|  > Yes that too is true, and is a strike against (2) and (4).
|  
|  I'm confused, the proposal explicitly says

Aha, yes, you are right.

Under (2) and (4), 
* if you supply *any* clauses the thing desugars to a lambda with
  the arity specified by the clauses
* if you supply *no* clauses, the thing desugars to a lambda with
  arity 1, namely  \x. case x of {}

I'll modify the voting page.

Simon

|  -----Original Message-----
|  From: ghc-steering-committee <ghc-steering-committee-bounces at haskell.org> On
|  Behalf Of Eric Seidel
|  Sent: 22 July 2021 14:39
|  To: ghc-steering-committee at haskell.org
|  Subject: Re: [ghc-steering-committee] Proposal #302: Multiway lambda: time
|  to vote
|  
|  On Mon, Jul 19, 2021, at 05:53, Simon Peyton Jones via ghc-steering-
|  committee wrote:
|  > 2. (2) and (4) seem to lose \case{}, which is useful in practice. Am I
|  > correct in saying that we'll lose \case{}?
|  >
|  > Yes that too is true, and is a strike against (2) and (4).
|  
|  I'm confused, the proposal explicitly says
|  
|  > If no clauses are given, i.e. the expression in question if \case {}, how
|  many arguments this expression should take is ambiguous. However, currently,
|  with -XEmptyCase, this expression is already valid and takes a single
|  argument. Thus, to maintain backwards compatibility and for lack of a better
|  option, this proposal does not alter the behavior of this expression.
|  
|  https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com
|  %2FJakobBruenker%2Fghc-proposals%2Fblob%2Fpatch-1%2Fproposals%2F0000-lambda-
|  layout.md%23alternative-2-comma-separated-
|  case&data=04%7C01%7Csimonpj%40microsoft.com%7C14976dfa458c469a46a008d94d
|  1633d5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637625580724196361%7CUnk
|  nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV
|  CI6Mn0%3D%7C3000&sdata=skhFsQ4rI354wZVyBFJndPfeWHAyba79MznmPNmlxIA%3D&am
|  p;reserved=0
|  
|  What's the problem with this solution? \case {} can still be instantiated at
|  any arity, but it will explode after applying a single argument.
|  _______________________________________________
|  ghc-steering-committee mailing list
|  ghc-steering-committee at haskell.org
|  https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.haske
|  ll.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-steering-
|  committee&data=04%7C01%7Csimonpj%40microsoft.com%7C14976dfa458c469a46a00
|  8d94d1633d5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637625580724196361%
|  7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwi
|  LCJXVCI6Mn0%3D%7C3000&sdata=4exfYaewnD%2BqnYd%2BI64VRlsTtX2QnN8X0pukt17r
|  ZfA%3D&reserved=0


More information about the ghc-steering-committee mailing list