[Haskell-cafe] Unexpected type error
alex.solla at gmail.com
Mon Jun 13 20:00:15 CEST 2011
On Mon, Jun 13, 2011 at 10:45 AM, Antoine Latter <aslatter at gmail.com> wrote:
> On Mon, Jun 13, 2011 at 12:34 PM, Alexander Solla <alex.solla at gmail.com>
> > On Sun, Jun 12, 2011 at 7:12 PM, Antoine Latter <aslatter at gmail.com>
> >> Types from differing versions of the same module are specifically not
> >> compatible - even if they are defined identically (in this case they
> >> are different, though).
> >> You can do one of two things:
> >> 1. Edit the package description of the package that wants the older
> >> version of parsec to allow to use the new one. Also, it helps to
> >> slightly bump the version number of the package when you do this.
> >> 2. Use the older version of parsec in your software. You already have
> >> it installed (or else the package you want to use wouldn't be able to
> >> load!). If you're using ghci you can start it with the option
> >> '-package parsec-18.104.22.168'.
> > I understand that types from different versions of a module are
> > incompatible. What I don't understand is why one module is using a new
> > version of Parsec when it is constrained to use the "old" one (I control
> > both modules. Their package descriptions contain the same line). Is
> this a
> > cabal-dev bug?
> > I'll try the "-package parsec-22.214.171.124" tip, but this is /not/ a long term
> > solution to my problem.
> I think I might be mus-understanding your problem.
> Which module is producing the error message? In which package? How are
> you compiling this module? What should be constraining it to the older
> version of parsec?
> I'd been assuming that you were getting this message from compiling
> your own modules by hand, or in GHCi.
I am working on "Lime", an unreleased module. It depends on "Lime-Utility",
which is also under my control. Lime's package description contains the
Build-Depends constraints (among many others):
Lime-Utility >=0.1 && <0.2
parsec >=2.1 && <2.2
Lime-Utility's package description contains the Build-depends constraint:
parsec >=2.1 && <2.2
I am using cabal-dev to maintain a package database in my Lime.Blah working
directory. I get a compilation failure (based on mismatched types, based on
different versions of Parsec) when I use:
$ cabal-dev ghci
> :cd src
> :l Lime.Data.IPAddress
Interestingly, if I do:
$ cabal-dev clean && cabal-dev configure && cabal-dev clean
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe