Skip to content

GHCi crash: thread blocked indefinitely in an MVar operation

This is my session with ghci:

C:\a_haskell>ghci
GHCi, version 7.0.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> 1+5
6
Prelude> main = interact wordCount

<interactive>:1:6: parse error on input `='
Prelude> main = interact wordCount

<interactive>:1:6: parse error on input `='
Prelude> main = interact wordCount where wordCount input = show (length (lines i
nput)) ++ "\n"

<interactive>:1:6: parse error on input `='
Prelude> runghc WC < quux.txt

<interactive>:1:1: Not in scope: `runghc'

<interactive>:1:8: Not in scope: data constructor `WC'

<interactive>:1:13: Not in scope: `quux'

<interactive>:1:18: Not in scope: `txt'
Prelude> runghc WC < quux.txt

<interactive>:1:1: Not in scope: `runghc'

<interactive>:1:8: Not in scope: data constructor `WC'

<interactive>:1:13: Not in scope: `quux'

<interactive>:1:18: Not in scope: `txt'
Prelude> Q

<interactive>:1:1: Not in scope: data constructor `Q'
Prelude> X

<interactive>:1:1: Not in scope: data constructor `X'
Prelude>
Prelude> :opt -t
unknown command ':opt'
use :? for help.
Prelude> :set +t
Prelude> succ 7
8
it :: Integer

Prelude>ghc.exe: panic! (the 'impossible' happened)
  (GHC version 7.0.3 for i386-unknown-mingw32):
        thread blocked indefinitely in an MVar operation

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Edited by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information