diff --git a/Language/Haskell/GhcMod/Cradle.hs b/Language/Haskell/GhcMod/Cradle.hs index c68ce21..322b82e 100644 --- a/Language/Haskell/GhcMod/Cradle.hs +++ b/Language/Haskell/GhcMod/Cradle.hs @@ -80,6 +80,12 @@ stackCradle wdir = do let cabalDir = takeDirectory cabalFile _stackConfigFile <- MaybeT $ findStackConfigFile cabalDir + + -- If dist/setup-config already exists the user probably wants to use cabal + -- rather than stack, or maybe that's just me ;) + mCabalSetupCfg <- mightExist $ setupConfigPath "dist" + when (isJust mCabalSetupCfg) $ mzero + distDir <- MaybeT $ getStackDistDir cabalDir return Cradle {