[GHC] #11555: catch _|_ breaks at -O1
GHC
ghc-devs at haskell.org
Wed Mar 9 13:14:07 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 Simon Peyton Jones <simonpj@…>):
In [changeset:"4c3a0a4a7b999251cbbee00befbfe32b86e556e2/ghc"
4c3a0a4a/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="4c3a0a4a7b999251cbbee00befbfe32b86e556e2"
Fix the implementation of lazyId
'lazy' was doing part of its job, but not all! In particular,
an application
f (lazy e)
where f is strict, was still being compiled using call-by-value in
CorePrep. This defeated the purpose of defining catch as
catch a b = catch# (lazy a) b
See Trac #11555, and Neil Mitchell's test case in comment:14
This patch makes 'lazy' behave properly. I updated Note [lazyId magic]
in MkId, but all the action is in CorePrep.
I can't say I really like this, but it does the job.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11555#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list