Compatibility with GHC 8.2.1

This commit is contained in:
Ben Gamari
2017-08-19 17:27:08 -04:00
parent 3d9a339869
commit d00e956e4a
10 changed files with 102 additions and 17 deletions

View File

@@ -1,3 +1,5 @@
{-# LANGUAGE CPP #-}
module GhcMod.LightGhc where
import Control.Monad
@@ -6,7 +8,9 @@ import Data.IORef
import GHC
import GHC.Paths (libdir)
#if __GLASGOW_HASKELL__ < 802
import StaticFlags
#endif
import SysTools
import DynFlags
import HscMain
@@ -17,6 +21,11 @@ import GhcMod.Monad.Types
import GhcMod.DynFlags
import qualified GhcMod.Gap as Gap
#if __GLASGOW_HASKELL__ >= 802
initStaticOpts :: Monad m => m ()
initStaticOpts = return ()
#endif
-- We have to be more careful about tearing down 'HscEnv's since GHC 8 added an
-- out of process GHCI server which has to be shutdown.
newLightEnv :: IOish m => (DynFlags -> LightGhc DynFlags) -> m HscEnv