<br><br><div class="gmail_quote">On Mon, Jun 13, 2011 at 10:45 AM, Antoine Latter <span dir="ltr"><<a href="mailto:aslatter@gmail.com">aslatter@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Mon, Jun 13, 2011 at 12:34 PM, Alexander Solla <<a href="mailto:alex.solla@gmail.com">alex.solla@gmail.com</a>> wrote:<br>
><br>
><br>
> On Sun, Jun 12, 2011 at 7:12 PM, Antoine Latter <<a href="mailto:aslatter@gmail.com">aslatter@gmail.com</a>> wrote:<br>
>><br>
>> Types from differing versions of the same module are specifically not<br>
>> compatible - even if they are defined identically (in this case they<br>
>> are different, though).<br>
>><br>
>> You can do one of two things:<br>
>><br>
>> 1. Edit the package description of the package that wants the older<br>
>> version of parsec to allow to use the new one. Also, it helps to<br>
>> slightly bump the version number of the package when you do this.<br>
>><br>
>> 2. Use the older version of parsec in your software. You already have<br>
>> it installed (or else the package you want to use wouldn't be able to<br>
>> load!). If you're using ghci you can start it with the option<br>
>> '-package parsec-2.1.0.1'.<br>
><br>
> I understand that types from different versions of a module are<br>
> incompatible. What I don't understand is why one module is using a new<br>
> version of Parsec when it is constrained to use the "old" one (I control<br>
> both modules. Their package descriptions contain the same line). Is this a<br>
> cabal-dev bug?<br>
> I'll try the "-package parsec-2.1.0.1" tip, but this is /not/ a long term<br>
> solution to my problem.<br>
<br>
</div></div>I think I might be mus-understanding your problem.<br>
<br>
Which module is producing the error message? In which package? How are<br>
you compiling this module? What should be constraining it to the older<br>
version of parsec?<br>
<br>
I'd been assuming that you were getting this message from compiling<br>
your own modules by hand, or in GHCi.<br></blockquote><div><br></div><div>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):</div>
<div><br></div><div>Lime-Utility >=0.1 && <0.2</div><div>parsec >=2.1 && <2.2</div><div><br></div><div>Lime-Utility's package description contains the Build-depends constraint:</div>
<div><br></div><div>parsec >=2.1 && <2.2</div><div> </div><div>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:</div>
<div><br></div><div>$ cabal-dev ghci</div><div>> :cd src</div><div>> :l Lime.Data.IPAddress</div><div><br></div><div>Interestingly, if I do:</div><div><br></div><div>$ cabal-dev clean && cabal-dev configure && cabal-dev clean</div>
<div><br></div><div>Lime.Data.IPAddress compiles.</div></div>