[GHC] #14998: Sort out the strictness mess for exceptions

GHC ghc-devs at haskell.org
Wed Apr 25 22:55:02 UTC 2018


#14998: Sort out the strictness mess for exceptions
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.4.3
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  Exceptions
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11555 #13330     |  Differential Rev(s):
  #10712 #11222 #13380               |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 I realized something. The `ExnStr` + `ThrowsExn` idea is the wrong idea
 ''for its purpose'', but it  might be the right idea for a ''different''
 purpose. Its goal (as I understand it) was to let us say that

 {{{#!hs
 m `catch` h
 }}}

 is sort of strict in `m`, and therefore we can evaluate `m` somewhat
 eagerly. This didn't work out, because we don't have enough information to
 do it right. However, what it ''should'' let us do correctly is a certain
 amount of dead code elimination. In particular, if we see that `m`
 definitely ''diverges'' (without throwing an exception), then we can
 simplify `catch m h` to `m`. But I'm betting this benefit isn't worth the
 complexity.

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


More information about the ghc-tickets mailing list