[GHC] #11555: catch _|_ breaks at -O1
GHC
ghc-devs at haskell.org
Fri Mar 11 12:26:51 UTC 2016
#11555: catch _|_ breaks at -O1
-------------------------------------+-------------------------------------
Reporter: slyfox | Owner:
Type: bug | Status: patch
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): Phab:D1973
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"30ee9102db2f16894912e19b9d16156824611bbb/ghc"
30ee9102/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="30ee9102db2f16894912e19b9d16156824611bbb"
Make `catch` lazy in the action
Previously
```lang=haskell
catch (error "uh oh") (\(_ :: SomeException) -> print "it failed")
```
would unexpectedly fail with "uh oh" instead of the handler being run
due to the strictness of `catch` in its first argument. See #11555 for
details.
Test Plan: Validate
Reviewers: austin, hvr, simonpj
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1973
GHC Trac Issues: #11555
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11555#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list