<div dir="ltr"><div>Hi,</div><div><br></div><div>I think it's non trivial due to us not having a nailed down design in several areas (i.e. it's not just coding work needed). If you look at the ToDo items at:</div><div>

<br></div><div>   <a href="https://ghc.haskell.org/trac/ghc/wiki/Commentary/Packages/MultiInstances">https://ghc.haskell.org/trac/ghc/wiki/Commentary/Packages/MultiInstances</a><br></div><div><br></div><div>several of the ToDos don't have clear designs yet. For example:</div>

<div><ul style="color:rgb(0,0,0);font-family:Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;font-size:13px"><li>instances of packages must install in a different location</li><ul><li>install directory includes hash?</li>

<li>SDM: not done yet. One problem is that we don't know the hash until the package is built, but we need to know the install locations earlier because we bake them into <tt style="color:rgb(102,0,0);border:1px solid rgb(238,221,204);border-top-left-radius:0.25em;border-top-right-radius:0.25em;border-bottom-right-radius:0.25em;border-bottom-left-radius:0.25em;padding:0px 0.3em;background-color:rgb(250,250,250)">Paths_foo.hs</tt>.</li>

<li>Simon and Andres discussed that one option is to let Cabal compute its own hash. However, then we'd have two hashes to deal with. Only using the Cabal-computed hash isn't an option either according to Simon, because apparently GHC's ABI hash computation is non-deterministic, so we might end up with situations where Cabal's hash is stable, but GHC computes an ABI-incompatible version. This is somewhat worrying ...</li>

<li>Duncan thinks that we should store both a package identity and a package ABI hash. Currently we form the package id from the name, version and ABI hash. We should store the ABI hash separately anyway because eventually we will want to know it, to know which packages are ABI compatible. So Cabal can compute a package Id in advance, however is sensible, and the ABI hash is calculated as now, after the build. The installation directory follows the package Id.</li>

</ul></ul>and</div><div><ul style="color:rgb(0,0,0);font-family:Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;font-size:13px"><li>GHC: discard conflicting instances during its shadowing phase</li><ul><li>

SDM: GHC will currently do *something* here, but it might end up with a result that the user didn't want/expect. One way to improve things is to prioritise packages that were installed more recently.</li><li>Andres suggests that GHC should be much cleverer, and look at the actual dependencies of the modules being compiled before deciding which packages to enable. This would almost certainly result in more things working and possibly less surprising behaviour sometimes, but Simon thinks that (a) it is too hard, (b) if users need this, they should use Cabal and its dependency resolver, which will do a good job, (c) you can often resolve problems by adding <tt style="color:rgb(102,0,0);border:1px solid rgb(238,221,204);border-top-left-radius:0.25em;border-top-right-radius:0.25em;border-bottom-right-radius:0.25em;border-bottom-left-radius:0.25em;padding:0px 0.3em;background-color:rgb(250,250,250)">-package X</tt>, and (d) eventually we will want a system where users manage separate sessions, so they can set up an environment in which the packages they want are available. This has a lot in common with <tt style="color:rgb(102,0,0);border:1px solid rgb(238,221,204);border-top-left-radius:0.25em;border-top-right-radius:0.25em;border-bottom-right-radius:0.25em;border-bottom-left-radius:0.25em;padding:0px 0.3em;background-color:rgb(250,250,250)">cabal-dev</tt> and sandboxes, so the mechanisms (and concepts) should be shared. (kosmikus: perhaps an alternative is to force the user to make an active decision in case of conflicts, i.e., to create a sandbox that exposes a consistent package set).</li>

</ul></ul>-- Johan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 28, 2013 at 1:12 PM, Simon Peyton-Jones <span dir="ltr"><<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d">Is it really that many cycles?  (Compared to all the other great stuff the Cabal team are doing.)<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d">Simon<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d"><u></u> <u></u></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 #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> Johan Tibell [mailto:<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>]
<br>
<b>Sent:</b> 28 November 2013 12:07<br>
<b>To:</b> Simon Peyton-Jones<br>
<b>Cc:</b> <a href="mailto:cabal-devel@haskell.org" target="_blank">cabal-devel@haskell.org</a><br>
<b>Subject:</b> Re: Should we aim for a new release in late January?<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Hi Simon,<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
I don't think it's being actively worked on. Duncan and I chat about it once in a while when we meet in person, but we don't have the cycles to do it.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
<u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
On Thu, Nov 28, 2013 at 12:41 PM, Simon Peyton-Jones <<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d">I’m thrilled that there so much Cabal activity! 
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d">Is anyone working on, or interested in, the issue of compiling and installing the same package against
 different dependencies?  (There was a Google SoC project about this.)  Cabal sandboxes address the same issue, but at some user cost.  It should Just Work.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d">Simon</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Verdana","sans-serif";color:#1f497d"> </span><u></u><u></u></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 #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
 cabal-devel [mailto:<a href="mailto:cabal-devel-bounces@haskell.org" target="_blank">cabal-devel-bounces@haskell.org</a>]
<b>On Behalf Of </b>Johan Tibell<br>
<b>Sent:</b> 27 November 2013 21:01<br>
<b>To:</b> <a href="mailto:cabal-devel@haskell.org" target="_blank">cabal-devel@haskell.org</a><br>
<b>Subject:</b> Should we aim for a new release in late January?</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt">Hi,<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt">Cabal development is continuing at a furious pace. There are lots of great things in master that I'd like to get out to users, such as<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> * relinking avoidance<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> * build -j<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> * ability to specify exact deps on the command line<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> * haskell-suite compiler support<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> * bug fixes<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt">Here's an approximate list of commits (both Cabal and cabal-install) since the last release:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt">    <a href="https://github.com/haskell/cabal/compare/Cabal-v1.18.1.2...master" target="_blank">
https://github.com/haskell/cabal/compare/Cabal-v1.18.1.2...master</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt">It's not entirely accurate as some patches were cherry-picked onto the 1.18 branch and thus have different commit IDs.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt">-- Johan<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:6.0pt"> <u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>