Add support for ghc-8.0.2
This commit is contained in:
parent
a4f5e1adbb
commit
b1ea960f29
@ -96,7 +96,12 @@ import TcRnTypes
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ >= 706
|
#if __GLASGOW_HASKELL__ >= 706
|
||||||
|
#if defined(MIN_VERSION_GLASGOW_HASKELL) && MIN_VERSION_GLASGOW_HASKELL(8,0,2,0)
|
||||||
|
import GHC hiding (ClsInst, withCleanupSession)
|
||||||
|
import qualified GHC (withCleanupSession)
|
||||||
|
#else
|
||||||
import GHC hiding (ClsInst)
|
import GHC hiding (ClsInst)
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
import GHC hiding (Instance)
|
import GHC hiding (Instance)
|
||||||
import Control.Arrow hiding ((<+>))
|
import Control.Arrow hiding ((<+>))
|
||||||
@ -673,6 +678,9 @@ everythingStagedWithContext stage s0 f z q x
|
|||||||
|
|
||||||
withCleanupSession :: GhcMonad m => m a -> m a
|
withCleanupSession :: GhcMonad m => m a -> m a
|
||||||
#if __GLASGOW_HASKELL__ >= 800
|
#if __GLASGOW_HASKELL__ >= 800
|
||||||
|
#if MIN_VERSION_GLASGOW_HASKELL(8,0,2,0)
|
||||||
|
withCleanupSession = GHC.withCleanupSession
|
||||||
|
#else
|
||||||
withCleanupSession ghc = ghc `gfinally` cleanup
|
withCleanupSession ghc = ghc `gfinally` cleanup
|
||||||
where
|
where
|
||||||
cleanup = do
|
cleanup = do
|
||||||
@ -682,6 +690,7 @@ withCleanupSession ghc = ghc `gfinally` cleanup
|
|||||||
cleanTempFiles dflags
|
cleanTempFiles dflags
|
||||||
cleanTempDirs dflags
|
cleanTempDirs dflags
|
||||||
stopIServ hsc_env
|
stopIServ hsc_env
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
withCleanupSession action = do
|
withCleanupSession action = do
|
||||||
df <- getSessionDynFlags
|
df <- getSessionDynFlags
|
||||||
|
Loading…
Reference in New Issue
Block a user