summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/linking
diff options
context:
space:
mode:
authorFendor <power.walross@gmail.com>2021-02-03 19:12:02 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-28 17:26:37 -0400
commit29d758631c0d9124485aafc89cddc4ec5a668653 (patch)
tree72efc6ad23ddc052cecd01b493384b8fbc74daab /testsuite/tests/ghci/linking
parentb02c8ef768df33ef4845da2f15583cf143a4d0e2 (diff)
downloadhaskell-29d758631c0d9124485aafc89cddc4ec5a668653.tar.gz
Add UnitId to Target record
In the future, we want `HscEnv` to support multiple home units at the same time. This means, that there will be 'Target's that do not belong to the current 'HomeUnit'. This is an API change without changing behaviour. Update haddock submodule to incorporate API changes.
Diffstat (limited to 'testsuite/tests/ghci/linking')
-rw-r--r--testsuite/tests/ghci/linking/dyn/T3372.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/ghci/linking/dyn/T3372.hs b/testsuite/tests/ghci/linking/dyn/T3372.hs
index f128c9bb45..e49e0a1672 100644
--- a/testsuite/tests/ghci/linking/dyn/T3372.hs
+++ b/testsuite/tests/ghci/linking/dyn/T3372.hs
@@ -27,7 +27,7 @@ main = do let test1 = "TestMain1.hs"
line "2" $ runInServer ghc_2 $ load (test2, "Main")
line "3" $ runInServer ghc_1 $ eval "test1"
line "4" $ runInServer ghc_2 $ eval "test2"
- where line n a = putStr (n ++ ": ") >> a
+ where line n a = putStr (n ++ ": ") >> a
type ModuleName = String
type GhcServerHandle = Chan (Ghc ())
@@ -37,7 +37,7 @@ newGhcServer = do (libdir:_) <- getArgs
pChan <- newChan
let be_a_server = forever $ join (GHC.liftIO $ readChan pChan)
forkIO $ ghc be_a_server libdir
- return pChan
+ return pChan
where ghc action libdir = GHC.runGhc (Just libdir) (init >> action)
init = do df <- GHC.getSessionDynFlags
GHC.setSessionDynFlags df{GHC.ghcMode = GHC.CompManager,
@@ -51,7 +51,7 @@ runInServer h action = do me <- newChan
readChan me
load :: (FilePath,ModuleName) -> Ghc ()
-load (f,mn) = do target <- GHC.guessTarget f Nothing
+load (f,mn) = do target <- GHC.guessTarget f Nothing Nothing
GHC.setTargets [target]
res <- GHC.load GHC.LoadAllTargets
GHC.liftIO $ putStrLn ("Load " ++ showSuccessFlag res)