aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/GhcSession.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs
index c2b752f..437e927 100644
--- a/tests/GhcSession.hs
+++ b/tests/GhcSession.hs
@@ -2,7 +2,7 @@
module Main where
import GHC
-#if __GLASGOW_HASKELL__ <= 704
+#if __GLASGOW_HASKELL__ <= 706
import GhcMonad
#endif
import GHC.Paths (libdir)
@@ -129,6 +129,7 @@ compileModule ep opts = do
setTargets ts'
_ <- load LoadAllTargets
+#if __GLASGOW_HASKELL__ >= 706
setContext $ case ep of
ChLibEntrypoint ms ms' ->
map (IIModule . mkModuleName . unChModuleName) $ ms ++ ms'
@@ -136,8 +137,9 @@ compileModule ep opts = do
map (IIModule . mkModuleName . unChModuleName) $ ChModuleName "Main" : ms
ChSetupEntrypoint ->
map (IIModule . mkModuleName) ["Main"]
+#endif
-#if __GLASGOW_HASKELL__ <= 704
+#if __GLASGOW_HASKELL__ <= 706
GhcMonad.liftIO $ print ExitSuccess
#else
liftIO $ print ExitSuccess