aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2018-01-09 15:03:56 +0100
committerDaniel Gröber <dxld@darkboxed.org>2018-01-18 14:10:26 +0100
commitbc60a1bfdf223fef44ee9c3a60686160af909906 (patch)
tree9bd413d76b4cb322b0b946b0c20d00b6a1b40c78
parentb8a2b780ba145926db0b25ca124baef9a8f14a40 (diff)
ghc-session: Factor out CPP
-rw-r--r--tests/GhcSession.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs
index 939fd7a..a1c164f 100644
--- a/tests/GhcSession.hs
+++ b/tests/GhcSession.hs
@@ -164,12 +164,14 @@ compileModule nb ep opts = do
map (IIModule . mkModuleName) ["Main"]
#endif
-#if __GLASGOW_HASKELL__ <= 706
- GhcMonad.liftIO $ print ExitSuccess
-#else
- liftIO $ print ExitSuccess
-#endif
+ liftIO'CH $ print ExitSuccess
return True
unChModuleName :: ChModuleName -> String
unChModuleName (ChModuleName mn) = mn
+
+#if __GLASGOW_HASKELL__ <= 706
+liftIO'CH = GhcMonad.liftIO
+#else
+liftIO'CH = liftIO
+#endif