[GHC] #1265: Template Haskell fail Messages not Getting Through

GHC trac at galois.com
Wed May 23 07:37:46 EDT 2007


#1265: Template Haskell fail Messages not Getting Through
---------------------------------+------------------------------------------
    Reporter:  twhitehe at uwo.ca   |        Owner:  igloo  
        Type:  bug               |       Status:  new    
    Priority:  normal            |    Milestone:  6.8    
   Component:  Template Haskell  |      Version:  6.6    
    Severity:  normal            |   Resolution:         
    Keywords:                    |   Difficulty:  Unknown
          Os:  Unknown           |     Testcase:         
Architecture:  Unknown           |  
---------------------------------+------------------------------------------
Changes (by simonpj):

  * owner:  => igloo

Comment:

 I think IOEnv eats the message because the typechecker (for example) often
 does fail, having stuffed its error message in the bag of errors.  We
 don't want an '''additional''' message from the fail; the purpose of the
 fail is just to propagate an exception out to the recovery point if any.

 Maybe there's another way to do this.  But meanwhile, the bug is fixed.
 Now you get
 {{{
 Prelude> let doit = fail "Code not written yet" ::Language.Haskell.TH.ExpQ
 Loading package template-haskell ... linking ... done.
 Prelude> $(doit)

 <interactive>:1:2: Code not written yet
 Prelude>
 }}}
 I'm leaving the bug open but assigned to Ian, in the hope that he'll add a
 test case and then close it.

 Simon

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


More information about the Glasgow-haskell-bugs mailing list