
#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 have tried the two suggestions for "lazy catch", namely: {{{#!hs safeCatch1 a b = join (evaluate a) `catch` b safeCatch2 a b = lazy a `catch` b }}} Both work in isolation on the tiny example. Only {{{safeCatch1}}} works in the Shake test suite, with {{{safeCatch2}}} I get the same error as before. That suggests that {{{lazy}}} is somehow insufficient to obtain the original behaviour. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11555#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler