Okay, so the problem is with cabal-install.<br>I&#39;d don&#39;t verily need ghc 7.2, I think I&#39;ll just stick to 7.0.4 unti cabal-install is updated, it will be simpler.<br><br><div class="gmail_quote">2011/10/24 Daniel Fischer <span dir="ltr">&lt;<a href="mailto:daniel.is.fischer@googlemail.com">daniel.is.fischer@googlemail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Monday 24 October 2011, 23:13:32, Yves Parčs wrote:<br>
&gt; I&#39;m using GHC 7.2.1 and cabal-install 0.8 (Cabal 1.8.0.2), and when<br>
&gt; &quot;cabal install rsa&quot;<br>
<br>
&gt;<br>
</div><div class="im">&gt; Apparently it&#39;s an instance being declared twice.<br>
&gt; However RSA hackage page states that it compiles under GHC 7.2:<br>
&gt; <a href="http://hackage.haskell.org/package/RSA" target="_blank">http://hackage.haskell.org/package/RSA</a><br>
<br>
</div>The instance in the rsa package is guarded by a Cabal MIN_VERSION macro:<br>
<br>
#if !MIN_VERSION_random(1,0,1)<br>
instance Random Word8 where<br>
  randomR (a,b) g = let aI::Int = fromIntegral a<br>
                        bI::Int = fromIntegral b<br>
                        (x, g&#39;) = randomR (aI, bI) g<br>
                    in (fromIntegral x, g&#39;)<br>
  random          = randomR (minBound, maxBound)<br>
#endif<br>
<br>
Unfortunately, that macro was broken in some Cabal versions, among them<br>
1.8.0.2, so the negated check goes wrong (#if !(MIN_...) would work).<br>
[As a quickfix for this package, you could edit the source, but you&#39;ll<br>
probably come across more macro problems later.]<br>
<br>
Build yourself a new cabal-install.<br>
If you use 7.2.1 for that, the recipe at <a href="https://gist.github.com/1169332" target="_blank">https://gist.github.com/1169332</a><br>
tells you what you have to change.<br>
If you have an older ghc still available, the vanilla procedure should work<br>
with that (if you&#39;re using the old 6.12.* with the Cabal-1.8.0.2, first<br>
install a later Cabal version, 1.8.0.6 works).<br>
</blockquote></div><br>