[GHC] #10209: parser: opt_kind_sig has incorrect SrcSpan

GHC ghc-devs at haskell.org
Tue Apr 14 06:20:03 UTC 2015


#10209: parser: opt_kind_sig has incorrect SrcSpan
-------------------------------------+-------------------------------------
        Reporter:  alanz             |                   Owner:  alanz
            Type:  bug               |                  Status:  patch
        Priority:  normal            |               Milestone:  7.10.2
       Component:  Compiler          |                 Version:  7.10.1
  (Parser)                           |                Keywords:
      Resolution:                    |  ApiAnnotations
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Other             |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:  Phab:D813
-------------------------------------+-------------------------------------

Comment (by Austin Seipp <austin@…>):

 In [changeset:"8aefc9b746512e91891879ad546e850e8a427d23/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="8aefc9b746512e91891879ad546e850e8a427d23"
 parser: opt_kind_sig has incorrect SrcSpan

 The production for opt_kind_sig is

   opt_kind_sig :: { Located (Maybe (LHsKind RdrName)) }
           :                             { noLoc Nothing }
           | '::' kind                   {% ajl (sLL $1 $> (Just $2))
 AnnDcolon (gl $1) }

 The outer Location is used only to get the full span for the enclosing
 declration, and is then stripped. The inner LHsKind then has a SrcSpan
 that does
 not include the '::'

 Extend the SrcSpan on $2 to include $1

 Reviewed By: austin

 Differential Revision: https://phabricator.haskell.org/D813

 GHC Trac Issues: #10209
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10209#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list