Fix building errors on ghc < 7.8 and tests

This commit is contained in:
Alejandro Serrano 2014-06-28 23:18:49 +02:00
parent 1b66f65b48
commit c06ee75fbb
3 changed files with 3 additions and 10 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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