[GHC] #14779: Compiling with -g fails -lint-core checks

GHC ghc-devs at haskell.org
Tue Feb 20 14:49:12 UTC 2018


#14779: Compiling with -g fails -lint-core checks
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:
  (Debugging)                        |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14122, #14123,   |  Differential Rev(s):  phab:D4423
  #8472, #14406                      |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > I think it's fine for these src ticks to appear anywhere

 As the Note in comment:2 says, our current story is
 {{{
 Note [CoreSyn top-level string literals]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 ...

 It is important to note that top-level primitive string literals cannot be
 wrapped in Ticks, as is otherwise done with lifted bindings. CoreToStg
 expects
 to see just a plain (Lit (MachStr ...)) expression on the RHS of primitive
 string bindings; anything else and things break. CoreLint checks this
 invariant.
 }}}
 We could change this invariant, by allowing some (or maybe any) ticks
 around a top-level string literal.  That's fine too!  We can change the
 story, presumably by changing the invariant, and changing what `CoreToSTG`
 does somehow.

 But what change to `CoreToSTG`?  Presumably by uconditionally discarding
 any ticks wrapped around a top-level literal string.  But if we do that,
 how will GDB ever see that info?

 I'm ok with either way; but I'd like us to be clear.

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


More information about the ghc-tickets mailing list