Thanks Albert! That clarifies the behavior. We had discussion on this in
https://github.com/commercialhaskell/stack/issues/1957 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.

-harendra

On 20 August 2016 at 06:37, Albert Y. C. Lai <tre...@vex.net> wrote:

> On 2016-08-16 07:08 AM, Harendra Kumar wrote:
>
>> As per the GHC manual
>> (https://downloads.haskell.org/~ghc/master/users-guide/packa
>> ges.html#the-ghc-package-path-environment-variable
>> <https://downloads.haskell.org/~ghc/master/users-guide/packa
>> ges.html#the-ghc-package-path-environment-variable>),
>> 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.
>>
>> I am dealing with a case where I have multiple versions of a package in
>> different databases.
>>
>
> No, they don't mean multiple versions. They mean this:
>
> 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.
>
> 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.
>
> The shadow rule exists because there are two scenerios that you really
> don't want to behave differently:
>
> 1. You have both HUnit-1.1 and HUnit-1.2, and they are in the same
> database.
>
> 2. You have both HUnit-1.1 and HUnit-1.2, but they are in different
> databases.
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
>
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users

Reply via email to