MTL Upgrade Problem
Daniel Fischer
daniel.is.fischer at googlemail.com
Sat Apr 16 15:28:55 CEST 2011
On Saturday 16 April 2011 14:41:00, Dominic Steinitz wrote:
> Hi, I have
>
> > dom1 at fourier:~/asn1_0> ghc-pkg list --user
> > /home/dom1/.ghc/i386-linux-6.12.1/package.conf.d
> >
> > mtl-1.1.0.2
> > mtl-2.0.1.0
>
> But I get the following error:
> > [4 of 6] Compiling LatticeMod ( LatticeMod.hs, interpreted )
> > [5 of 6] Compiling ConstraintGeneration ( ConstraintGeneration.lhs,
> > interpreted )
> >
> > ConstraintGeneration.lhs:781:6:
> > Overlapping instances for Monad (Either String)
<snip>
> > Language.ASN1.PER.Integer, Language.ASN1.PER.IntegerAux.
>
> If I do
>
> > dom1 at fourier:~/asn1_0> ghc-pkg hide mtl-2.0.1.0
>
> Then the error goes away. But if I do
>
> > ghc-pkg hide mtl-1.1.0.2
>
> Then I still get the error.
Some library you use was built against mtl-1, I think, so you inherit that
instance.
>
> Is there a wiki page that tells me what to do to upgrade from mtl-1 to
> mtl-2? Or perhaps someone can tell me what to do?
Rebuild the libraries that depend on mtl against mtl-2.
$ ghc-pkg unregister mtl-1.1.0.2
should tell you which packages are affected, unregister those first (or
later after unregistering mtl-1.1.0.2 with --force) and reinstall them
against mtl-2. That doesn't work however, if any of them have a dependency
bound mtl < 2, so check that first (and even if they have no upper bound on
mtl, they may use the State or Writer, ... data constructors which aren't
available anymore since State etc. are now type synonyms).
Or upgrade to ghc-7.0.3 and install everything fresh.
>
> Many thanks, Dominic.
More information about the Libraries
mailing list