
Hi, Am Freitag, den 18.10.2013, 14:46 -0400 schrieb Richard Eisenberg:
The TH_Roles tests both use `runIO` inside of a TH splice to spit out some stuff. It seems (even on my machine) that when output is redirected, the result of a `runIO` is suppressed. For example, when I compile
{-# LANGUAGE TemplateHaskell #-} module Scratch where
import Language.Haskell.TH
$( do runIO $ putStrLn "hi there" return [] )
I get an output include "hi there" when I run ghc normally, but
prompt> ghc -c Scratch.hs >stdout.txt
leaves me with no output to my terminal, and a stdout.txt that lists only the loaded libraries, no "hi there".
I would guess that the problem on Travis is closely related. Does anyone know more about this output suppression?
the docs for runIO say Note: for various murky reasons, stdout and stderr handles are not necesarily flushed when the compiler finishes running, so you should flush them yourself. so I guess that should be done in the tests, for greater reproducibility. I just added that (522f81d), let’s see if it helps with travis. Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0x4743206C Debian Developer: nomeata@debian.org