Fix for "ghc-mod doc Data.Maybe" when used with stack projects
When ghc-pkg is invoked from a stack project the global database is indeed used: $ stack exec -- ghc-pkg find-module Data.Maybe /var/lib/ghc/package.conf.d base-4.9.0.0 /home/user/.stack/snapshots/x86_64-linux/lts-7.11/8.0.1/pkgdb (no packages) /home/user/work/ghc-mod-5.6.0.0/.stack-work/install/x86_64-linux/lts-7.11/8.0.1/pkgdb (no packages) Therefore "ghc-mod doc" should also use GlobalDb
This commit is contained in:
parent
9ef3e67f21
commit
80ddf63691
@ -86,7 +86,7 @@ getPackageDbStack = do
|
|||||||
CabalProject ->
|
CabalProject ->
|
||||||
getCabalPackageDbStack
|
getCabalPackageDbStack
|
||||||
(StackProject StackEnv {..}) ->
|
(StackProject StackEnv {..}) ->
|
||||||
return $ map PackageDb [seSnapshotPkgDb, seLocalPkgDb]
|
return $ [GlobalDb, PackageDb seSnapshotPkgDb, PackageDb seLocalPkgDb]
|
||||||
return $ fromMaybe stack mCusPkgStack
|
return $ fromMaybe stack mCusPkgStack
|
||||||
|
|
||||||
getPackageCachePaths :: IOish m => FilePath -> GhcModT m [FilePath]
|
getPackageCachePaths :: IOish m => FilePath -> GhcModT m [FilePath]
|
||||||
|
Loading…
Reference in New Issue
Block a user