Fix building errors on ghc < 7.8 and tests
This commit is contained in:
parent
1b66f65b48
commit
c06ee75fbb
@ -350,18 +350,10 @@ typeForUser = pprTypeForUser False
|
||||
#endif
|
||||
|
||||
nameForUser :: Name -> SDoc
|
||||
#if __GLASGOW_HASKELL__ >= 708
|
||||
nameForUser = pprOccName . getOccName
|
||||
#else
|
||||
nameForUser = pprOccName False . getOccName
|
||||
#endif
|
||||
|
||||
occNameForUser :: OccName -> SDoc
|
||||
#if __GLASGOW_HASKELL__ >= 708
|
||||
occNameForUser = pprOccName
|
||||
#else
|
||||
occNameForUser = pprOccName False
|
||||
#endif
|
||||
|
||||
deSugar :: TypecheckedModule -> LHsExpr Id -> HscEnv
|
||||
-> IO (Maybe CoreExpr)
|
||||
|
@ -4,12 +4,11 @@
|
||||
module Language.Haskell.GhcMod.SrcUtils where
|
||||
|
||||
import Control.Applicative ((<$>))
|
||||
import CoreMonad (liftIO)
|
||||
import CoreUtils (exprType)
|
||||
import Data.Generics
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Ord as O
|
||||
import GHC (Ghc, LHsExpr, LPat, Id, DynFlags, SrcSpan, Type, Located, ParsedSource, RenamedSource, TypecheckedSource, GenLocated(L))
|
||||
import GHC (LHsExpr, LPat, Id, DynFlags, SrcSpan, Type, Located, ParsedSource, RenamedSource, TypecheckedSource, GenLocated(L))
|
||||
import GhcMonad
|
||||
import qualified GHC as G
|
||||
import GHC.SYB.Utils (Stage(..), everythingStaged)
|
||||
|
@ -182,6 +182,8 @@ Test-Suite spec
|
||||
, monad-control
|
||||
, hspec >= 1.8.2
|
||||
, split
|
||||
, haskell-src-exts
|
||||
, text
|
||||
if impl(ghc < 7.7)
|
||||
Build-Depends: convertible
|
||||
, Cabal >= 1.10 && < 1.17
|
||||
|
Loading…
Reference in New Issue
Block a user