[GHC] #7918: SrcSpan's associated with expanded quasi-quotes are inconsistent

GHC ghc-devs at haskell.org
Tue Jul 30 16:07:12 CEST 2013


#7918: SrcSpan's associated with expanded quasi-quotes are inconsistent
-------------------------------------+------------------------------------
        Reporter:  edsko             |            Owner:
            Type:  bug               |           Status:  infoneeded
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.4.2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by edsko):

 As demonstrated by the attached example, the problem still persists in GHC
 HEAD. The output of the program is

 {{{
 Found HsVar GHC.Types.False     at T7918B.hs:7:7-13
 Found HsVar GHC.Types.True      at T7918B.hs:6:11-13
 Found HsVar GHC.Classes.||      at T7918B.hs:6:11-13
 Found HsVar GHC.Types.False     at T7918B.hs:6:11-13
 Found HsVar GHC.Types.True      at T7918B.hs:6:11-13
 Found HsVar GHC.Classes.||      at T7918B.hs:6:11-13
 Found HsVar GHC.Types.False     at T7918B.hs:6:11-13
 Found HsVar GHC.Types.True      at T7918B.hs:6:11-13
 Found HsVar GHC.Classes.||      at T7918B.hs:6:11-13
 Found HsVar GHC.Types.False     at T7918B.hs:6:11-13
 Found HsVar GHC.Types.True      at T7918B.hs:6:11-13
 Found HsVar GHC.Classes.||      at T7918B.hs:6:11-13
 Found HsVar GHC.Types.False     at T7918B.hs:6:11-13
 Found HsVar GHC.Types.True      at T7918B.hs:5:11-13
 Found HsVar GHC.Types.True      at T7918B.hs:5:11-13
 Found HsVar GHC.Types.True      at T7918B.hs:4:7-13
 }}}

 Note the 7-13 rather than 11-13 in the first and last line. Note that this
 is the source span associated with the HsVar, not with the larger
 expression (which is, indeed, consistent across the 4 quasi-quotes).

 I will try and see if I can come up with a patch for this.

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




More information about the ghc-tickets mailing list