
Replying to [comment:22 simonpj]:
I'm one of those who thinks that the fact that `f R { x = e }` means `f (R { x = e })` is a mistake :-).
I agree with you here, but I think the proposal in this ticket is still sensible, given that the perhaps-unexpected parsing started with a keyword. In the record update case, the perhaps-unexpected parsing isn't known until the open-brace, even though your brain has to parse the
#10843: Allow do blocks without dollar signs as arguments -------------------------------------+------------------------------------- Reporter: agibiansky | Owner: agibiansky Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 (Parser) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11706 | Differential Rev(s): Phab:D1219 Wiki Page: | -------------------------------------+------------------------------------- Comment (by maeder): Replying to [comment:27 goldfire]: preceding space differently. To me, that's the real problem with the parsing of record-update: it's not left-to-right. I fully agree, too! The record syntax is unrelated to this proposal. Curly record braces are sort of a strong binding postfix operator and are thus different from plain parentheses. @aiko I would omit the point "This would make do blocks consistent with record creation ..." under Pros on https://ghc.haskell.org/trac/ghc/wiki/ArgumentDo. Record creation is only another kind of a more "non-atomic" aexp in the grammar. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10843#comment:28 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler