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
|
#endif
|
||||||
|
|
||||||
nameForUser :: Name -> SDoc
|
nameForUser :: Name -> SDoc
|
||||||
#if __GLASGOW_HASKELL__ >= 708
|
|
||||||
nameForUser = pprOccName . getOccName
|
nameForUser = pprOccName . getOccName
|
||||||
#else
|
|
||||||
nameForUser = pprOccName False . getOccName
|
|
||||||
#endif
|
|
||||||
|
|
||||||
occNameForUser :: OccName -> SDoc
|
occNameForUser :: OccName -> SDoc
|
||||||
#if __GLASGOW_HASKELL__ >= 708
|
|
||||||
occNameForUser = pprOccName
|
occNameForUser = pprOccName
|
||||||
#else
|
|
||||||
occNameForUser = pprOccName False
|
|
||||||
#endif
|
|
||||||
|
|
||||||
deSugar :: TypecheckedModule -> LHsExpr Id -> HscEnv
|
deSugar :: TypecheckedModule -> LHsExpr Id -> HscEnv
|
||||||
-> IO (Maybe CoreExpr)
|
-> IO (Maybe CoreExpr)
|
||||||
|
@ -4,12 +4,11 @@
|
|||||||
module Language.Haskell.GhcMod.SrcUtils where
|
module Language.Haskell.GhcMod.SrcUtils where
|
||||||
|
|
||||||
import Control.Applicative ((<$>))
|
import Control.Applicative ((<$>))
|
||||||
import CoreMonad (liftIO)
|
|
||||||
import CoreUtils (exprType)
|
import CoreUtils (exprType)
|
||||||
import Data.Generics
|
import Data.Generics
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import Data.Ord as O
|
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 GhcMonad
|
||||||
import qualified GHC as G
|
import qualified GHC as G
|
||||||
import GHC.SYB.Utils (Stage(..), everythingStaged)
|
import GHC.SYB.Utils (Stage(..), everythingStaged)
|
||||||
|
@ -182,6 +182,8 @@ Test-Suite spec
|
|||||||
, monad-control
|
, monad-control
|
||||||
, hspec >= 1.8.2
|
, hspec >= 1.8.2
|
||||||
, split
|
, split
|
||||||
|
, haskell-src-exts
|
||||||
|
, text
|
||||||
if impl(ghc < 7.7)
|
if impl(ghc < 7.7)
|
||||||
Build-Depends: convertible
|
Build-Depends: convertible
|
||||||
, Cabal >= 1.10 && < 1.17
|
, Cabal >= 1.10 && < 1.17
|
||||||
|
Loading…
Reference in New Issue
Block a user