summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-01-03 16:10:27 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2014-01-03 16:10:27 +0000
commitbcd92b038d9da81e9ea22fc48ee3495ab6d22338 (patch)
tree04e1663ff184f2104c6229d622ebfcf2348d24af /testsuite
parentb0cdb9b3b6c61463241093161a5b6cf6144e7348 (diff)
downloadhaskell-bcd92b038d9da81e9ea22fc48ee3495ab6d22338.tar.gz
Do hFlush in the T8639_api test
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/ghc-api/T8639_api.hs3
-rw-r--r--testsuite/tests/ghc-api/T8639_api.stdout1
2 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/tests/ghc-api/T8639_api.hs b/testsuite/tests/ghc-api/T8639_api.hs
index 4232aa00b9..2ddfb4919e 100644
--- a/testsuite/tests/ghc-api/T8639_api.hs
+++ b/testsuite/tests/ghc-api/T8639_api.hs
@@ -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))
diff --git a/testsuite/tests/ghc-api/T8639_api.stdout b/testsuite/tests/ghc-api/T8639_api.stdout
index 3d957c18e3..659a1ddccd 100644
--- a/testsuite/tests/ghc-api/T8639_api.stdout
+++ b/testsuite/tests/ghc-api/T8639_api.stdout
@@ -1 +1,2 @@
+3
GHC.Types.Bool