<div dir="ltr">Hi,<div><br></div><div>As per the GHC manual (<a href="https://downloads.haskell.org/~ghc/master/users-guide/packages.html#the-ghc-package-path-environment-variable" target="_blank">https://downloads.haskell.<wbr>org/~ghc/master/users-guide/<wbr>packages.html#the-ghc-package-<wbr>path-environment-variable</a>), packages which come earlier in the GHC_PACKAGE_PATH supersede the ones which come later. But that does not seem to be the case always. </div><div><br></div><div>I am dealing with a case where I have multiple versions of a package in different databases. I am passing the list of package dbs via GHC_PACKAGE_PATH and ghc is picking the one which comes later. I expect it to pick the one which comes earlier in the path. </div><div><br></div><div>In one case the package being picked from a package db which comes later is a newer version which makes me wonder if GHC always prefers a newer version. In another case both the versions are same but still GHC is using the one which come later in the package path. Are there any undocumented factors into play here?</div><div><br></div><div>None of the packages is broken (as reported by ghc-pkg check).</div><div><br></div><div>See <a href="https://github.com/commercialhaskell/stack/issues/1957#issuecomment-239655912" target="_blank">https://github.com/<wbr>commercialhaskell/stack/<wbr>issues/1957#issuecomment-<wbr>239655912</a> for more details on where it is coming from.</div><div><br></div><div>Thanks,</div><div>Harendra</div></div>