[GHC] #15143: Passing an IO value through several functions results in program hanging.
GHC
ghc-devs at haskell.org
Fri May 18 08:40:21 UTC 2018
#15143: Passing an IO value through several functions results in program hanging.
-------------------------------------+-------------------------------------
Reporter: Burtannia | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by danilo2):
@Burtannia, thanks for the reply! Why do you think `mr` is not strictly
evaluated there? It is a strict function argument, so it have to be
evaluated at least to WHNF. This is State over IO, so probably there could
be some unevaluated parts, like the inner tuple (not the tuple values,
because this is a strict state) in the state monad definition, but in such
case I don't see (yet) how it could affect the performance and why `!r <-
mr` and `!_ <- mr` behave differently – they both force evaluation of all
intermediate structures of the monadic stack.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15143#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list