[GHC] #1678: runIO does not catch userErrors, just causes code generation to fail silently

GHC trac at haskell.org
Fri Sep 28 05:39:13 EDT 2007


#1678: runIO does not catch userErrors, just causes code generation to fail
silently
---------------------------------+------------------------------------------
    Reporter:  greenrd           |        Owner:         
        Type:  bug               |       Status:  new    
    Priority:  normal            |    Milestone:  6.8.1  
   Component:  Template Haskell  |      Version:  6.7    
    Severity:  normal            |   Resolution:         
    Keywords:  runIO regression  |   Difficulty:  Unknown
          Os:  Linux             |     Testcase:         
Architecture:  x86_64 (amd64)    |  
---------------------------------+------------------------------------------
Changes (by greenrd):

  * keywords:  => runIO regression

Comment:

 FYI - This is a regression - the previous behaviour, in ghc 6.6, was:

 {{{
 Loading package template-haskell ... linking ... done.

 <interactive>:1:2:
     Exception when trying to run compile-time code:
       user error (hi)
       Code: let
               fail = fail IO $dMonad
               $dMonad = GHC.IOBase.$f16
             in ($) [IO Exp, Q Exp] (runIO Exp) (fail Exp "hi")
     In the expression: $[splice](runIO $ (fail "hi"))
     In the definition of `it': it = $[splice](runIO $ (fail "hi"))
 }}}

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


More information about the Glasgow-haskell-bugs mailing list