[GHC] #10537: Parser: commas_tup_tail returns spurious "Missing" value
GHC
ghc-devs at haskell.org
Wed Jun 17 15:14:23 UTC 2015
#10537: Parser: commas_tup_tail returns spurious "Missing" value
-------------------------------------+-------------------------------------
Reporter: alanz | Owner: alanz
Type: bug | Status: new
Priority: normal | Milestone: 7.10.2
Component: Compiler | Version: 7.10.1
(Parser) | Keywords:
Resolution: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by mpickering):
I think you're right Simon. There is something wrong with the annotations
though, firstly both the Missing elements have the same SrcSpan `L
tests/examples/Tuple.hs:3:24`.
{{{
((tests/examples/Tuple.hs:3:8, AnnComma),
[tests/examples/Tuple.hs:3:9]),
((tests/examples/Tuple.hs:3:11-17, AnnComma),
[tests/examples/Tuple.hs:3:18]),
((tests/examples/Tuple.hs:3:20-22, AnnComma),
[tests/examples/Tuple.hs:3:23]),
((tests/examples/Tuple.hs:3:24, AnnComma),
[tests/examples/Tuple.hs:3:24]),
}}}
Here are the relevant annotations. Notice how the first three commas are
associated with the preceding item (much like they are for lists) but the
last one is associated directly with the `Missing`. As both `Missing`s
have the same SrcSpan then this is causing duplicated output in `ghc-
exactprint`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10537#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list