#2597: panic! (the 'impossible' happened) (using TH)
------------------------------+---------------------------------------------
 Reporter:  jcab              |          Owner:         
     Type:  bug               |         Status:  new    
 Priority:  normal            |      Milestone:         
Component:  Template Haskell  |        Version:  6.8.3  
 Severity:  major             |     Resolution:         
 Keywords:                    |     Difficulty:  Unknown
 Testcase:                    |   Architecture:  x86    
       Os:  Windows           |  
------------------------------+---------------------------------------------
Comment (by jcab):

 A-ha! I've reduced this to the minimal. It is caused by trying to expand
 list comprehensions:

 mkBug = returnQ $ CompE [BindS (VarP $ mkName "p") (ListE []), NoBindS
 (VarE $ mkName "p")]

    That simple template causes the panic (on 6.8.3) when invoked:

 bug = $mkBug

 My code seems to work correctly if I get the comprehensions eliminated at
 template-compile time so there are no comprehensions in the returned
 expression tree.

 BTW: defining comprehensions as "CompE [Stmt]" is... weird. Putting the
 two statements in the opposite order doesn't change the outcome.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2597#comment:2>
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