[GHC] #11555: catch _|_ breaks at -O1
GHC
ghc-devs at haskell.org
Sat Feb 13 07:57:11 UTC 2016
#11555: catch _|_ breaks at -O1
-------------------------------------+-------------------------------------
Reporter: slyfox | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler | Version: 8.0.1-rc2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by NeilMitchell):
I talked to Simon offline a few days ago, after that I believe his opinion
was:
* {{{catch#}}} should remain strict in it's first argument.
* {{{catch a b = catch# (lazy a) b}}} is the correct way to express the
laziness, the {{{evaluate}}} trick certainly avoids the problem for now,
but it may not be robust in the future.
* There are places in the IO subsystem which get a significant benefit
from a strict catch, they should use a more primitive version
({{{strictCatch}}} or something).
* The default exposed {{{catch}}} (and also {{{try}}}, {{{handle}}} etc)
should use {{{lazy}}}. All these functions seem to share the same
underlying entry point, so that shouldn't be hard.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11555#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list