[GHC] #15660: source file modify race leads to inconsistent error message

GHC ghc-devs at haskell.org
Thu Sep 20 19:49:09 UTC 2018


#15660: source file modify race leads to inconsistent error message
-------------------------------------+-------------------------------------
           Reporter:  joeyhess       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  low            |         Milestone:
          Component:  Compiler       |           Version:  8.2.2
           Keywords:                 |  Operating System:  Linux
       Architecture:                 |   Type of failure:  Poor/confusing
  Unknown/Multiple                   |  error message
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I got this odd error message from ghc:


 {{{

 Command/AddUrl.hs:120:32: error:
     lexical error in string/character literal at character '-'
     |
 120 |                 BatchNull -> '\0'
     |                                ^

 }}}

 Part of the error message says that '-' is the problem character,
 but the quoted line of code does not contain that.

 What happened is I started the build, noticed I had typoed '\-' and
 quickly corrected it in my editor and saved. It seems ghc must have read
 the source file twice, so I raced it and so experienced this
 inconsistency.

 I wonder if it could display the wrong line entirely if a larger change
 was made to the file?

 Thanks for your time with such a minor thing as this bug.

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


More information about the ghc-tickets mailing list