[GHC] #10712: Regression: make TEST=exceptionsrun001 WAY=optasm is failing

GHC ghc-devs at haskell.org
Tue Jan 26 12:33:48 UTC 2016


#10712: Regression: make TEST=exceptionsrun001 WAY=optasm is failing
-------------------------------------+-------------------------------------
        Reporter:  thomie            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  base/tests/exceptionsrun001
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1616
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Are you sure?  exceptionsrun001 seems OK to me.

 It turns out that the other three all relied on imprecise exceptions being
 precise.  Eg conc012 has
 {{{
 forkIO $ Control.Exception.catch (x `seq` putMVar result Finished) $
 }}}
 If you want to be sure that `x` will only be evaluated under the `catch`
 you must use `evaluate` thus:
 {{{
 forkIO $ Control.Exception.catch (evaluate x >> putMVar result Finished) $
 }}}
 Similarly conc014 had
 {{{
      error "wibble"  `Control.Exception.catch`  ...
 }}}
 But the `error "wibble"` is a pure bottom value and we make no guarantees
 about when it is evaluated.  It should be more like
 {{{
     throwIO (ErrorCall "wibble")  `Control.Exception.catch` ....
 }}}
 which raises the exception in the IO monad (i.e. precisely).

 Same with `T3279`, which had
 {{{
         error "foo" `catch` \(SomeException e) -> do
 }}}
 Again that `error "foo"` should be `throwIO (ErrorCall "foo")`.

 Incidentally, is there a function for `throwIO . ErrorCall`?

 I'll make a patch for these three tests. Then I claim we are done.

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


More information about the ghc-tickets mailing list