#1552: GHCi thinks large list literals impossible?
----------------------+-----------------------------------------------------
  Reporter:  SamB     |          Owner:         
      Type:  bug      |         Status:  new    
  Priority:  normal   |      Milestone:         
 Component:  GHCi     |        Version:  6.6    
  Severity:  normal   |       Keywords:         
Difficulty:  Unknown  |             Os:  Unknown
  Testcase:           |   Architecture:  Unknown
----------------------+-----------------------------------------------------
{{{
 Prelude> :set -fth
 Prelude> $(let s = replicate 26227 'x' in [| s |])
 Loading package template-haskell ... linking ... done.
 ghc-6.6: panic! (the 'impossible' happened)
   (GHC version 6.6 for i386-unknown-linux):
         mkProtoBCO: stack use won't fit in 16 bits 131145
 }}}

 Note: I ran into this with a far more interestinng string, which I
 actually used TH to generate, but the code was a lot longer. I think this
 happens partly because {{{String}}}s are lifted as {{{ListE}}s of {{{(LitE
 . CharL)}}}s, rather than as {LitE . StrinL}s, but even if you changed
 that I could still get the same thing to happen by replacing {{{'x'}}}
 with {{{(1::Int)}}}, so obviously that isn't the whole problem. (Why in
 the world does the code for long list literals need an enormous stack
 anyway?)

 On a side note, this also crashes -ddump-ds, though that's probably
 reasonable...

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1552>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to