Fix compilation errors on ghc < 7.8
This commit is contained in:
parent
11acd93bf6
commit
063ca80946
@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Language.Haskell.GhcMod.CaseSplit (
|
||||
splitVar
|
||||
, splits
|
||||
@ -71,7 +73,12 @@ getSrcSpanTypeForSplit modSum lineNo colNo = do
|
||||
tcm@TypecheckedModule{tm_typechecked_source = tcs} <- G.typecheckModule p
|
||||
let bs:_ = listifySpans tcs (lineNo, colNo) :: [LHsBind Id]
|
||||
varPat = find isPatternVar $ listifySpans tcs (lineNo, colNo) :: Maybe (LPat Id)
|
||||
match:_ = listifyParsedSpans pms (lineNo, colNo) :: [G.LMatch G.RdrName (LHsExpr G.RdrName)]
|
||||
match:_ = listifyParsedSpans pms (lineNo, colNo)
|
||||
#if __GLASGOW_HASKELL__ < 708
|
||||
:: [G.LMatch G.RdrName]
|
||||
#else
|
||||
:: [G.LMatch G.RdrName (LHsExpr G.RdrName)]
|
||||
#endif
|
||||
case varPat of
|
||||
Nothing -> return Nothing
|
||||
Just varPat' -> do
|
||||
|
@ -24,7 +24,7 @@ import qualified Class as Ty
|
||||
#if __GLASGOW_HASKELL__ >= 706
|
||||
import OccName (occName)
|
||||
#else
|
||||
import OccName (rdrNameOcc)
|
||||
import RdrName (rdrNameOcc)
|
||||
#endif
|
||||
import qualified Language.Haskell.Exts.Annotated as HE
|
||||
|
||||
|
@ -78,7 +78,9 @@ newtype GhcMod a = GhcMod {
|
||||
deriving (Functor,
|
||||
Applicative,
|
||||
Monad,
|
||||
#if __GLASGOW_HASKELL__ >= 708
|
||||
MonadIO,
|
||||
#endif
|
||||
MonadReader GhcModEnv,
|
||||
MonadWriter GhcModWriter,
|
||||
MonadState GhcModState)
|
||||
|
Loading…
Reference in New Issue
Block a user