<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal" style="margin-left:36.0pt">Having GHC support multiple copies of the same package/version would certainly be a step in the right direction. It still wouldn't completely address the goals I'm getting at in my blog post. What I'm really aiming
 for overall is to provide users with a stable, vetted set of packages that are known to work well together. But for those of us who will still be using plain Hackage, this improvement would be very helpful.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Indeed. &nbsp;I&#8217;ve always thought of the Haskell Platform as doing the &#8220;stable set&#8221; part, though there must be plenty of space between HP at one end and Hackage
 at the other, and that&#8217;s what you are exploring I think.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Regardless, being able to install multiple instantiations of the same package/version is desirable for the &#8220;stable set&#8221; story, so that more than one stable
 set is possible; and so that trying to use a package outside the stable set doesn&#8217;t mess up your stable-set installation.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">The question is: who will do the work?<br>
<br>
Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> michael.snoyman@gmail.com [mailto:michael.snoyman@gmail.com]
<b>On Behalf Of </b>Michael Snoyman<br>
<b>Sent:</b> 22 November 2012 10:40<br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Cc:</b> Haskell Libraries (libraries@haskell.org); cabal-devel@haskell.org<br>
<b>Subject:</b> Re: Cabal and GHC<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Thu, Nov 22, 2012 at 10:32 AM, Simon Peyton-Jones &lt;<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal">Michael Snoyman wrote a blog post about Solving Cabal Hall, which came across via the peerless Haskell Weekly News.
<a href="http://www.yesodweb.com/blog/2012/11/solving-cabal-hell" target="_blank">
http://www.yesodweb.com/blog/2012/11/solving-cabal-hell</a><br>
<br>
But I'd be unlikely to return there so I'm posting this to the libraries and cabal-devel lists.<br>
<br>
I'm not deep in Cabal lore, but it seems to me that there is a fairly easy way to do a Lot Better than we are now. Let's go back to &quot;Identifying the Problem&quot;. &nbsp;Michael doesn't say, but I'm guessing that Fay depends on yesod-platform. &nbsp;Very well, so Cabal sees<br>
<br>
&nbsp; I'm installing Fay,<br>
&nbsp; which depends on yesod-platform, which dpends on data-default<br>
&nbsp; and depends directly on data-default<br>
<br>
If the package database was empty, Cabal would try to figure out a version of data-default that is acceptable to both yesod-platform and to Fay. &nbsp;And that's what we want!<br>
<br>
Suppose that Cabal figures out that yesod-platform-2.7 and data-default-0,4 would work. &nbsp;Then, in an empty package database, it could just go ahead and install those. &nbsp;But in your example, the database isn't empty; we have already isntalled yesod-platform-2.7,
 dependin gon data-default-0.5. &nbsp;And (here's the rub) you can only have yesod-platform-2.7 installed once.<br>
<br>
One solution might be<br>
&nbsp;1. *un* install yesod-platform-2.7 (depending on data-default-0.5) and<br>
&nbsp;2. *re* install it (depending on data-default-0.4).<br>
But that would break any programs that use both yesod-platform-2.7 and data-default-0.5.<br>
<br>
The solution is obvious: we should make it possible to instally yesod-platform-2.7 twice,<br>
&nbsp; once version depending on data-default-0.4<br>
&nbsp; once version depending on data-default-0.5.<br>
<br>
Now, if Cabal can figure out a plan based on an empty database, it can deliver on that plan even in a non-empty database, without messing up any existing installations.<br>
<br>
Of course, if Fay depends exclusively on data-default-0.4, and yesod-platform depends exclusively on data-default-0.5, then they genuinely are incompatible, and Cabal can and should say so. That's not Cabal Hell. &nbsp;That's just saying that the package authors
 have *specified* that they are incompatible.<br>
<br>
Summary. &nbsp;I may be way off beam here, but I think we can easily make things way better than they are. &nbsp;By &quot;easily&quot; I mean with just design and implementation work. &nbsp;That's not free, and no one has any time.... but it's well within reach. I'd even been wondering
 about trying to crowd-fund this development so that Well Typed can do it. &nbsp;But let's first see if it'd solve the problem.<br>
<br>
There must be a wiki page somewhere that articulates the challenge, points to blog posts about it, and discusses solutions.<br>
<br>
Simon<br>
<br>
<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Hi Simon,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Having GHC support multiple copies of the same package/version would certainly be a step in the right direction. It still wouldn't completely address the goals I'm getting at in my blog post. What I'm really aiming for overall is to provide
 users with a stable, vetted set of packages that are known to work well together. But for those of us who will still be using plain Hackage, this improvement would be very helpful.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">MIchael<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>