[Haskell-cafe] strange behavior of GHC 7.8.2
christiaan.baaij at gmail.com
Mon Jul 7 09:59:51 UTC 2014
On Jul 7, 2014, at 9:58 AM, Kazu Yamamoto (山本和彦) <kazu at iij.ad.jp> wrote:
> Hi Yuras,
> Thank you for your reply.
>> I'm 90% sure you have MonadIO and RWST imported from different versions of
>> transformers. Try to load the code into ghci and check ':i MonadIO' and ':i
>> RWST'. If you'll see fully qualified (including package name and version)
>> names somewhere, then that is the issue.
>> See also
> Yes. Probably MonadIO belongs to transformers 0.3.0.0 while RWST does
> to transformers 0.4.1.0.
> My question is why this happens. I think that GHCi should use RWST
> provided by transformers 0.3.0.0.
I think GHC always picks the package with the highest version number, and does _not_ resolve to the package that gives the least amount of type errors.
The "Loading package transformers-0.3.0.0" is not there due to your own use of transformers.
It's being loaded because it is a dependency of 'ghc-7.8.2'.
Also note that this behaviour is not specific to 7.8.*, it is also present in 7.6.3.
The only thing you can to with both version of transformers installed is to just do:
> ghci -package ghc -hide-package transformers-0.4.1.0 A.hs
More information about the Haskell-Cafe