From bc60a1bfdf223fef44ee9c3a60686160af909906 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Tue, 9 Jan 2018 15:03:56 +0100 Subject: ghc-session: Factor out CPP --- tests/GhcSession.hs | 12 +++++++----- 1 file 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 -- cgit v1.2.3