Commit a9b14790 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

testsuite: Fix putStrLn in saks028

Bizarrely, `saks028` previously failed reliably, but only on Windows
(#17450). The test would exit with a zero exit code but simply didn't
emit the expected text to stderr.

I believe this was due to the fact that the test used `putStrLn`,
resulting in the output ending up on stdout. This worked on other
platforms since (apparently) we redirect stdout to stderr when
evaluating splices. However, on Windows it seems that the redirected
output wasn't flushed as it was on other platforms.

Anyways, it seems like the right thing to do here is to be explicit
about our desire for the output to end up on stderr.

Closes #17450.
parent f73fbd2d
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
module SAKS_028 where module SAKS_028 where
import System.IO
import Data.Kind import Data.Kind
import Language.Haskell.TH hiding (Type) import Language.Haskell.TH hiding (Type)
...@@ -10,5 +11,5 @@ type Functor' :: (Type -> Type) -> Constraint ...@@ -10,5 +11,5 @@ type Functor' :: (Type -> Type) -> Constraint
class Functor' f class Functor' f
do sig <- reifyType ('' Functor') do sig <- reifyType ('' Functor')
runIO $ putStrLn $ pprint sig runIO $ hPutStrLn stderr $ pprint sig
return [] return []
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment