diff options
author | Harry Garrood harry@garrood.me <harry@garrood.me> | 2021-03-01 20:48:20 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-04-05 20:39:19 -0400 |
commit | 77772bb122410ef58ff006a1d18c6f2212216fda (patch) | |
tree | 00db8f71faeb7b038826a154f55746eb2b382bb8 /testsuite | |
parent | 89acbf356b1e1c09cb1cd123f56ab5f3ad6d0634 (diff) | |
download | haskell-77772bb122410ef58ff006a1d18c6f2212216fda.tar.gz |
Add type signature for TargetContents.go
These changes made it slightly easier for me to work out what was going
on in this test. I've also fixed a typo in the comments.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/ghc-api/target-contents/TargetContents.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/testsuite/tests/ghc-api/target-contents/TargetContents.hs b/testsuite/tests/ghc-api/target-contents/TargetContents.hs index 685e799fc6..80b865ee86 100644 --- a/testsuite/tests/ghc-api/target-contents/TargetContents.hs +++ b/testsuite/tests/ghc-api/target-contents/TargetContents.hs @@ -63,7 +63,7 @@ main = do ] -- These check if on-disk modules can import in-memory targets and - -- vice-verca. + -- vice-versa. forM_ (words "DD MM DM MD") $ \sync@[a_sync, b_sync] -> do dep <- return $ \y -> [( "A" @@ -101,6 +101,15 @@ ppSync InMemory = "M" readSync 'D' = OnDisk readSync 'M' = InMemory +type Mod = + ( String -- module name + , String -- pragmas + , [String] -- imports + , [(String, String)] -- bindings (LHS, RHS) + , Sync -- Is the module on disk or just in memory? + ) + +go :: String -> [String] -> [Mod] -> Ghc () go label targets mods = do liftIO $ createDirectoryIfMissing False "./outdir" setTargets []; _ <- load LoadAllTargets |