Do hFlush in the T8639_api test
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 3 Jan 2014 16:10:27 +0000 (16:10 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 3 Jan 2014 16:10:27 +0000 (16:10 +0000)
testsuite/tests/ghc-api/T8639_api.hs
testsuite/tests/ghc-api/T8639_api.stdout

index 4232aa0..2ddfb49 100644 (file)
@@ -14,12 +14,13 @@ main
            target <- guessTarget "T8639_api_a.hs" Nothing
            setTargets [target]
            load LoadAllTargets
-           imps <- mapM parseImportDecl ["import Prelude", "import T8639_api_a"]
+           imps <- mapM parseImportDecl ["import Prelude", "import System.IO", "import T8639_api_a"]
            setContext (map IIDecl imps)
 
            -- With the next line, you get an "Not in scope" exception.
            -- If you comment out this runStmt, it runs without error and prints the  type.
            runStmt "putStrLn (show 3)" RunToCompletion
+           runStmt "hFlush stdout" RunToCompletion
 
            ty <- exprType "T8639_api_a.it"
            liftIO (putStrLn (showPpr flags ty))