<div dir="ltr">Thanks Albert! That clarifies the behavior. We had discussion on this inĀ <a href="https://github.com/commercialhaskell/stack/issues/1957">https://github.com/commercialhaskell/stack/issues/1957</a> as well where ezyang provided clarifications on the behavior. We need to update the documentation to make it more precise and accurate. I will file a ticket for that.<div><br></div><div>-harendra<br><div class="gmail_extra"><br><div class="gmail_quote">On 20 August 2016 at 06:37, Albert Y. C. Lai <span dir="ltr"><<a href="mailto:trebla@vex.net" target="_blank">trebla@vex.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="">On 2016-08-16 07:08 AM, Harendra Kumar wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="">
As per the GHC manual<br>
(<a href="https://downloads.haskell.org/~ghc/master/users-guide/packages.html#the-ghc-package-path-environment-variable" rel="noreferrer" target="_blank">https://downloads.haskell.org<wbr>/~ghc/master/users-guide/packa<wbr>ges.html#the-ghc-package-path-<wbr>environment-variable</a><br></span>
<<a href="https://downloads.haskell.org/~ghc/master/users-guide/packages.html#the-ghc-package-path-environment-variable" rel="noreferrer" target="_blank">https://downloads.haskell.org<wbr>/~ghc/master/users-guide/packa<wbr>ges.html#the-ghc-package-path-<wbr>environment-variable</a>>),<span class=""><br>
packages which come earlier in the GHC_PACKAGE_PATH supersede the ones<br>
which come later. But that does not seem to be the case always.<br>
<br>
I am dealing with a case where I have multiple versions of a package in<br>
different databases.<br>
</span></blockquote>
<br>
No, they don't mean multiple versions. They mean this:<br>
<br>
For example if two databases both have HUnit-1.1 (important: same name and same version number), then that's when all the talk about overriding is relevant.<br>
<br>
If you have different version numbers, the override rule doesn't apply, the rule that applies is the shadow rule: the highest version number wins.<br>
<br>
The shadow rule exists because there are two scenerios that you really don't want to behave differently:<br>
<br>
1. You have both HUnit-1.1 and HUnit-1.2, and they are in the same database.<br>
<br>
2. You have both HUnit-1.1 and HUnit-1.2, but they are in different databases.<br>
______________________________<wbr>_________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org" target="_blank">Glasgow-haskell-users@haskell.<wbr>org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/glasgow-has<wbr>kell-users</a><br>
</blockquote></div><br></div></div></div>