While working on bug #537468, I noticed something very strange. Running the shellcheck test suite "by hand" works: $ runghc Setup.hs test Running 1 test suites... Test suite test-shellcheck: RUNNING... Test suite test-shellcheck: PASS Test suite logged to: dist/test/ShellCheck-0.3.5-test-shellcheck.log 1 of 1 test suites (1 of 1 test cases) passed. But running it from a compiled ./setup does not: $ ghc Setup.hs -o setup [1 of 1] Compiling Main ( Setup.hs, Setup.o ) Linking setup ... $ ./setup test Running 1 test suites... Test suite test-shellcheck: RUNNING... ^C^C The test suite spawns some other processes, I think. So I was playing around, and I noticed that I can make it work by compiling ./setup with -threaded: $ ghc -threaded Setup.hs -o setup Linking setup ... $ ./setup test Running 1 test suites... Test suite test-shellcheck: RUNNING... Test suite test-shellcheck: PASS Test suite logged to: dist/test/ShellCheck-0.3.5-test-shellcheck.log 1 of 1 test suites (1 of 1 test cases) passed. I have no idea what's going on here. Should we be compiling the ./setup binary with -threaded? Why doesn't it work without it?
This may be a Cabal bug, see the URL.
Pushed workaround as: > 20 Jul 2015; Sergei Trofimovich <slyfox@gentoo.org> haskell-cabal.eclass: > Workaround upstream cabal tests hangup bug #537500 by Michael Orlitzky; use > ghc's haddock for doc generation. https://github.com/gentoo-haskell/gentoo-haskell/commit/d7e07b594ef6ed0d78241cfaa369cafbff59f1f1