<br><br><div class="gmail_quote">On Mon, Jun 13, 2011 at 10:45 AM, Antoine Latter <span dir="ltr">&lt;<a href="mailto:aslatter@gmail.com">aslatter@gmail.com</a>&gt;</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 &lt;<a href="mailto:alex.solla@gmail.com">alex.solla@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Sun, Jun 12, 2011 at 7:12 PM, Antoine Latter &lt;<a href="mailto:aslatter@gmail.com">aslatter@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Types from differing versions of the same module are specifically not<br>
&gt;&gt; compatible - even if they are defined identically (in this case they<br>
&gt;&gt; are different, though).<br>
&gt;&gt;<br>
&gt;&gt; You can do one of two things:<br>
&gt;&gt;<br>
&gt;&gt; 1. Edit the package description of the package that wants the older<br>
&gt;&gt; version of parsec to allow to use the new one. Also, it helps to<br>
&gt;&gt; slightly bump the version number of the package when you do this.<br>
&gt;&gt;<br>
&gt;&gt; 2. Use the older version of parsec in your software. You already have<br>
&gt;&gt; it installed (or else the package you want to use wouldn&#39;t be able to<br>
&gt;&gt; load!). If you&#39;re using ghci you can start it with the option<br>
&gt;&gt; &#39;-package parsec-2.1.0.1&#39;.<br>
&gt;<br>
&gt; I understand that types from different versions of a module are<br>
&gt; incompatible.  What I don&#39;t understand is why one module is using a new<br>
&gt; version of Parsec when it is constrained to use the &quot;old&quot; one (I control<br>
&gt; both modules.  Their package descriptions contain the same line).  Is this a<br>
&gt; cabal-dev bug?<br>
&gt; I&#39;ll try the &quot;-package parsec-2.1.0.1&quot; tip, but this is /not/ a long term<br>
&gt; 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&#39;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 &quot;Lime&quot;, an unreleased module.  It depends on &quot;Lime-Utility&quot;, which is also under my control.  Lime&#39;s package description contains the Build-Depends constraints (among many others):</div>
<div><br></div><div>Lime-Utility  &gt;=0.1  &amp;&amp; &lt;0.2</div><div>parsec         &gt;=2.1 &amp;&amp; &lt;2.2</div><div><br></div><div>Lime-Utility&#39;s package description contains the Build-depends constraint:</div>
<div><br></div><div>parsec         &gt;=2.1 &amp;&amp; &lt;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>&gt; :cd src</div><div>&gt; :l Lime.Data.IPAddress</div><div><br></div><div>Interestingly, if I do:</div><div><br></div><div>$ cabal-dev clean &amp;&amp; cabal-dev configure &amp;&amp; cabal-dev clean</div>
<div><br></div><div>Lime.Data.IPAddress compiles.</div></div>