[Haskell-cafe] Unexpected type error

Antoine Latter aslatter at gmail.com
Mon Jun 13 19:45:43 CEST 2011

On Mon, Jun 13, 2011 at 12:34 PM, Alexander Solla <alex.solla at gmail.com> wrote:
> On Sun, Jun 12, 2011 at 7:12 PM, Antoine Latter <aslatter at gmail.com> wrote:
>> 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-'.
> 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-" 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.

Take care,

More information about the Haskell-Cafe mailing list