Unexpected failures on Travis

Joachim Breitner mail at joachim-breitner.de
Fri Oct 18 19:43:33 UTC 2013


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


Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0x4743206C
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20131018/48fcda05/attachment.sig>

More information about the ghc-devs mailing list