Disable stack support for ghc <7.8
This commit is contained in:
parent
1c0c97bdbb
commit
16c69b2743
@ -79,6 +79,10 @@ cabalCradle wdir = do
|
||||
|
||||
stackCradle :: (IOish m, GmOut m) => FilePath -> MaybeT m Cradle
|
||||
stackCradle wdir = do
|
||||
#if !MIN_VERSION_ghc(7,8,0)
|
||||
-- GHC < 7.8 is not supported by stack
|
||||
mzero
|
||||
#endif
|
||||
cabalFile <- MaybeT $ liftIO $ findCabalFile wdir
|
||||
|
||||
let cabalDir = takeDirectory cabalFile
|
||||
|
@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
module CabalHelperSpec where
|
||||
|
||||
import Control.Arrow
|
||||
@ -57,11 +58,13 @@ spec = do
|
||||
then forM_ opts (\o -> o `shouldContain` ["-no-user-package-conf","-package-conf", cwd </> "test/data/cabal-project/.cabal-sandbox/"++ghcSandboxPkgDbDir bp])
|
||||
else forM_ opts (\o -> o `shouldContain` ["-no-user-package-db","-package-db",cwd </> "test/data/cabal-project/.cabal-sandbox/"++ghcSandboxPkgDbDir bp])
|
||||
|
||||
#if !MIN_VERSION_ghc(7,8,0)
|
||||
it "handles stack project" $ do
|
||||
let tdir = "test/data/stack-project"
|
||||
[ghcOpts] <- map gmcGhcOpts . filter ((==ChExeName "new-template-exe") . gmcName) <$> runD' tdir getComponents
|
||||
let pkgs = pkgOptions ghcOpts
|
||||
sort pkgs `shouldBe` ["base", "bytestring"]
|
||||
#endif
|
||||
|
||||
it "extracts build dependencies" $ do
|
||||
let tdir = "test/data/cabal-project"
|
||||
|
Loading…
Reference in New Issue
Block a user