
`unsafeInterleaveIO` lets you ensure that it occurs after the effects
#9390: Inlining prevents evaluation of ignored parts of unboxed tuples -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.4 Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Incorrect | Difficulty: Unknown result at runtime | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by snoyberg): I'm confused about the end of your comment, in particular: thus far in the do-block have occurred But your example then implies that the `x` thunk will reliably be evaluated before `V.freeze vm >>= print`, which does not seem to follow from your comment. Can you clarify? I'd be happy to take a crack at writing up some documentation. For a while, I've wanted to have a clear set of rules for when `unsafePerformIO`, `unsafeDupablePerformIO`, and `inlinePerformIO` (aka unsafeAccursedPerformIO) are safe to use. Once I get some more clarity from our discussion here, I'd like to take a pass at such a Wiki page, and would greatly appreciate your review. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9390#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler