summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-06-29 22:36:40 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-22 20:19:59 -0400
commitf7cc431341e5b5b31758eecc8504cae8b2390c10 (patch)
tree7404d90376432d5a311a7fc6355b02085a1a5367 /testsuite/tests/ghc-api
parent735f9d6bac316a0c1c68a8b49bba465f07b01cdd (diff)
downloadhaskell-f7cc431341e5b5b31758eecc8504cae8b2390c10.tar.gz
Replace HscTarget with Backend
They both have the same role and Backend name is more explicit. Metric Decrease: T3064 Update Haddock submodule
Diffstat (limited to 'testsuite/tests/ghc-api')
-rw-r--r--testsuite/tests/ghc-api/T10052/T10052.hs2
-rw-r--r--testsuite/tests/ghc-api/T8639_api.hs2
-rw-r--r--testsuite/tests/ghc-api/apirecomp001/myghc.hs7
3 files changed, 6 insertions, 5 deletions
diff --git a/testsuite/tests/ghc-api/T10052/T10052.hs b/testsuite/tests/ghc-api/T10052/T10052.hs
index a2e50a6bc6..03a4a65d6e 100644
--- a/testsuite/tests/ghc-api/T10052/T10052.hs
+++ b/testsuite/tests/ghc-api/T10052/T10052.hs
@@ -21,7 +21,7 @@ runGhc' args act = do
dflags0 <- getSessionDynFlags
(dflags1, _leftover, _warns) <- parseDynamicFlags dflags0 flags
let dflags2 = dflags1 {
- hscTarget = HscInterpreted
+ backend = Interpreter
, ghcLink = LinkInMemory
, verbosity = 1
}
diff --git a/testsuite/tests/ghc-api/T8639_api.hs b/testsuite/tests/ghc-api/T8639_api.hs
index 48024f6726..3b7648e397 100644
--- a/testsuite/tests/ghc-api/T8639_api.hs
+++ b/testsuite/tests/ghc-api/T8639_api.hs
@@ -10,7 +10,7 @@ main
= do { [libdir] <- getArgs
; runGhc (Just libdir) $ do
flags <- getSessionDynFlags
- setSessionDynFlags (flags{ hscTarget = HscInterpreted, ghcLink = LinkInMemory})
+ setSessionDynFlags (flags{ backend = Interpreter, ghcLink = LinkInMemory})
target <- guessTarget "T8639_api_a.hs" Nothing
setTargets [target]
load LoadAllTargets
diff --git a/testsuite/tests/ghc-api/apirecomp001/myghc.hs b/testsuite/tests/ghc-api/apirecomp001/myghc.hs
index 0b65d5add6..03c57e93a5 100644
--- a/testsuite/tests/ghc-api/apirecomp001/myghc.hs
+++ b/testsuite/tests/ghc-api/apirecomp001/myghc.hs
@@ -11,6 +11,7 @@ module Main where
import GHC
import GHC.Driver.Session
+import GHC.Driver.Backend
import GHC.Utils.Monad ( MonadIO(..) )
import GHC.Types.Basic ( failed )
import GHC.Data.Bag ( bagToList )
@@ -24,8 +25,8 @@ main = do
dflags0 <- getSessionDynFlags
(dflags, _, _) <- parseDynamicFlags dflags0
(map (mkGeneralLocated "on the commandline") args)
- setSessionDynFlags $ dflags { hscTarget = HscNothing
- , ghcLink = LinkInMemory
+ setSessionDynFlags $ dflags { backend = NoBackend
+ , ghcLink = LinkInMemory
, verbosity = 0 -- silence please
}
root_mod <- guessTarget "A.hs" Nothing
@@ -35,7 +36,7 @@ main = do
prn "target nothing: ok"
dflags <- getSessionDynFlags
- setSessionDynFlags $ dflags { hscTarget = HscInterpreted }
+ setSessionDynFlags $ dflags { backend = Interpreter }
ok <- load LoadAllTargets
when (failed ok) $ error "Couldn't load A.hs in interpreted mode"
prn "target interpreted: ok"