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

GHC ghc-devs at haskell.org
Thu Jan 31 09:43:38 UTC 2019


#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,
                                     |  DemandAnalysis
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 sgraf):

 Replying to [comment:32 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.

 I'm currently messing with Demand Analysis again and ExnStr has become a
 huge pain. I'll prepare a patch to remove it.

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


More information about the ghc-tickets mailing list