[GHC] #10843: Allow do blocks without dollar signs as arguments
GHC
ghc-devs at haskell.org
Tue Jul 5 08:21:50 UTC 2016
#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 akio):
Replying to [comment:23 rwbarton]:
> I don't think parsing `f a b {-# SCC #-} d e` as `f a b ({-# SCC #-} d
e)` is even an option, really, since these pragmas must be ignorable by
compilers that don't understand them.
Agreed.
> Also, I think/hope this proposal does not change the parsing of any
program that currently parses, right?
I believe this is the case, although I don't have a proof. My rough
argument is:
1. This extension doesn't introduce any new conflict in the parser
(shift/reduce or reduce/reduce)
2. By chasing the new grammar you can see that `do`, lambda, etc. continue
to parse as a `lexp`.
So if there is any change in the parsing of any currently-valid program,
then it must be a result of somehow triggering an existing ambiguity in
the grammar, but this seems unlikely.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10843#comment:25>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list