diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/ghc-api/T8628.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/T8639_api.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/apirecomp001/myghc.hs | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/testsuite/tests/ghc-api/T8628.hs b/testsuite/tests/ghc-api/T8628.hs index 203d3282ab..d3b05a9f86 100644 --- a/testsuite/tests/ghc-api/T8628.hs +++ b/testsuite/tests/ghc-api/T8628.hs @@ -24,10 +24,10 @@ main setContext [ IIDecl (simpleImportDecl pRELUDE_NAME) , IIDecl (simpleImportDecl (mkModuleNameFS (fsLit "System.IO")))] runDecls "data X = Y ()" - runStmt "print True" RunToCompletion - gtry $ runStmt "print (Y ())" RunToCompletion :: GhcMonad m => m (Either SomeException RunResult) + execStmt "print True" execOptions + gtry $ execStmt "print (Y ())" execOptions :: GhcMonad m => m (Either SomeException ExecResult) runDecls "data X = Y () deriving Show" _ <- dynCompileExpr "'x'" - runStmt "print (Y ())" RunToCompletion - runStmt "System.IO.hFlush System.IO.stdout" RunToCompletion + execStmt "print (Y ())" execOptions + execStmt "System.IO.hFlush System.IO.stdout" execOptions print "done" diff --git a/testsuite/tests/ghc-api/T8639_api.hs b/testsuite/tests/ghc-api/T8639_api.hs index 2ddfb4919e..36458b8eca 100644 --- a/testsuite/tests/ghc-api/T8639_api.hs +++ b/testsuite/tests/ghc-api/T8639_api.hs @@ -19,8 +19,8 @@ main -- 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 + execStmt "putStrLn (show 3)" execOptions + execStmt "hFlush stdout" execOptions ty <- exprType "T8639_api_a.it" liftIO (putStrLn (showPpr flags ty)) diff --git a/testsuite/tests/ghc-api/apirecomp001/myghc.hs b/testsuite/tests/ghc-api/apirecomp001/myghc.hs index 39545c937d..a21aa47fa6 100644 --- a/testsuite/tests/ghc-api/apirecomp001/myghc.hs +++ b/testsuite/tests/ghc-api/apirecomp001/myghc.hs @@ -44,11 +44,11 @@ main = do setContext [IIModule mod] liftIO $ hFlush stdout -- make sure things above are printed before -- interactive output - r <- runStmt "main" RunToCompletion + r <- execStmt "main" execOptions case r of - RunOk _ -> prn "ok" - RunException _ -> prn "exception" - RunBreak _ _ _ -> prn "breakpoint" + ExecComplete { execResult = Right _ } -> prn "ok" + ExecComplete { execResult = Left _ } -> prn "exception" + ExecBreak{} -> prn "breakpoint" liftIO $ hFlush stdout return () |