#844: panic on conflicting patterns in TH splice
---------------------------------+------------------------------------------
    Reporter:  guest             |        Owner:         
        Type:  bug               |       Status:  new    
    Priority:  normal            |    Milestone:         
   Component:  Template Haskell  |      Version:  6.4.2  
    Severity:  minor             |     Keywords:         
          Os:  Unknown           |   Difficulty:  Unknown
Architecture:  Unknown           |  
---------------------------------+------------------------------------------
The definition
 {{{
 g c c = undefined
 }}}
 gives a nice error message:

     Conflicting definitions for `c'
     In the definition of `g'
 .

 However, when trying to splice in the analogous function
 {{{
 foo = sequence
   [
     funD (mkName "f")
       [
         clause
           [varP $ mkName "c",varP $ mkName "c"]
           (normalB $ [| undefined |])
           []
       ]
   ]
 }}}, the compiler panics:

 ghc-6.4.2: panic! (the `impossible' happened, GHC version 6.4.2):
         SrcLoc.srcSpanStartLine

 . It would be nice if ghc gave an error message just like the non-TH case.

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

Reply via email to