[GHC] #12414: Ill-formed or incorrect multiline string in compiler/main/GHC.hs

GHC ghc-devs at haskell.org
Wed Jul 20 21:50:06 UTC 2016


#12414: Ill-formed or incorrect multiline string in compiler/main/GHC.hs
-------------------------------------+-------------------------------------
        Reporter:  ifigueroap        |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  lowest            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:  invalid           |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by ifigueroap):

 Replying to [comment:6 rwbarton]:
 > I don't understand the question...? That is a source file, it is not
 produced by anything. GHC automatically runs it through CPP before
 compiling, because it has `{-# LANGUAGE CPP #-}`. The output of CPP is a
 valid Haskell module.

 Well, my point is that when running hothasktags, which internally runs
 cpphs and then tries to parse with haskell-src-exts I get the
 aforementioned "Illegal character in string gap", ''which in this
 particular case may mean that the output of the preprocessor is not a
 valid Haskell module.'' I'm not sure whether this is the case in the build
 process, as I didn't find how to get the post-processed file during
 compilation.

 To illustrate my point, if I manually run the preprocessor (in the
 compiler/main dir):

 {{{
 cpphs -I../ -I../stage1 GHC.hs > GHC2.hs
 }}}

 (Note the two includes are for HsVersions.h  in compiler/ and for
 ghc_autoconf.h in compiler/stage1).

 I get the "ill-formed" two-line string in the resulting GHC2.hs file. Of
 course I'm not sure what other flags are being passed to cpphs...

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


More information about the ghc-tickets mailing list