[GHC] #14356: "Main: thread blocked indefinitely in an MVar operation" in fixIO
GHC
ghc-devs at haskell.org
Mon Oct 16 11:03:48 UTC 2017
#14356: "Main: thread blocked indefinitely in an MVar operation" in fixIO
-------------------------------------+-------------------------------------
Reporter: nickkuk | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime | Version: 8.2.1
System |
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:
-------------------------------------+-------------------------------------
I'm not sure whether such behavior is expected, but this program
{{{
import System.IO
main = fixIO (\x -> return 1) >>= print
}}}
prints "1"; and this
{{{
import System.IO
main = fixIO (\(x, _) -> return (1, print x)) >>= print . fst
}}}
prints "Main: thread blocked indefinitely in an MVar operation".
Second program arises from something like
{{{
{-# LANUGAGE RecursiveDo #-}
main = mdo
...
x <- return 1
let f = do
...
print x
...
...
return f
}}}
It is not necessary to call f somewhere in mdo to get "Main: thread
blocked indefinitely in an MVar operation".
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14356>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list