[GHC] #12620: Allow the user to prevent floating and CSE
GHC
ghc-devs at haskell.org
Thu Sep 29 23:49:01 UTC 2016
#12620: Allow the user to prevent floating and CSE
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #9520, #8457 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by tomjaguarpaw):
Edsko, it seems to me that the problem that you mention here is quite easy
to avoid.
{{{#!hs
main :: IO ()
main = retry $ return () >>= \_ -> ni_mapM_ print [1..1000000]
}}}
is sufficient, unless I am very much mistaken. With such a construction
the list is allocated afresh for each invocation of the `IO` action.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12620#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list