Skip to content

internal error: main thread has been GC'd

when compiling the following program with ghc 6.2.1

count :: (?c :: Integer) => IO ()
count = do y <- return ?c
           putStr ((show ?c)++"\n")
           let ?c = y+1 in count 

main = let ?c=0 in count

compiles fine with ghc: --make  -fglasgow-exts test.hs
While running, wenn pressing control-c to break, it
tells me:

a.out: internal error: main thread has been GC'd
    Please report this as a bug to
glasgow-haskell-bugs@haskell.org,
    or http://www.sourceforge.net/projects/ghc/


Trac metadata
Trac field Value
Version None
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedFixed
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information