Fix finding sandbox in sandbox only projects

This commit is contained in:
Daniel Gröber
2015-02-07 16:40:22 +01:00
parent 11562b4fe7
commit 417cacbf81
3 changed files with 57 additions and 25 deletions

View File

@@ -29,11 +29,8 @@ getPackageDbStack :: FilePath -- ^ Project Directory (where the
-- cabal.sandbox.config file would be if it
-- exists)
-> IO [GhcPkgDb]
getPackageDbStack cdir = do
mSDir <- getSandboxDb cdir
return $ [GlobalDb] ++ case mSDir of
Nothing -> [UserDb]
Just db -> [PackageDb db]
getPackageDbStack cdir =
([GlobalDb] ++) . maybe [UserDb] return <$> getSandboxDb cdir
----------------------------------------------------------------