<div dir="ltr"><br><br><div class="gmail_quote">On Sat, Oct 18, 2008 at 6:02 AM, Eric Kow <span dir="ltr">&lt;<a href="mailto:eric.kow@gmail.com">eric.kow@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It seems we all agree that /some/ form of Cabalisation is a good thing to have<br>
in the official darcs repository. &nbsp;This is what I believe to be the form of<br>
cabalisation that everybody can live with.</blockquote><div><br>Cool.&nbsp; It&#39;s good to be talking about these on the public mailing list.<br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

With these patches, cabal configure and cabal build configure and build darcs<br>
respectively using franchise as the build method. &nbsp;This allows us to use<br>
franchise&#39;s checking for C libraries, while providing metadata to integrate with<br>
cabal-install and to help automatic distro packaging tools. &nbsp;The package<br>
dependency information is on a purely advisory basis; it is ignored by franchise.</blockquote><div><br>Which library does the installation?&nbsp; If cabal is the one taking the risk of screwing up my system that makes me feel a lot better about running install.&nbsp; I&#39;d also prefer if we could get cabal doing the build, if only because cabal has the nice feature of not cluttering src/ with intermediate files.&nbsp; Maybe franchise has the feature and it&#39;s turned off by default? <br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Notes<br>
-----<br>
* Dependency information is ignored, and is provided on a purely advisory basis<br>
 &nbsp;only</blockquote><div><br>Hmm...then how is it calculated?&nbsp; I guess I&#39;ll have to try it out to see.&nbsp; In particular ambiguity and conflict resolution between packages may be an issue. <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

* I disabled building the documentation for now because I would find setup<br>
 &nbsp;hanging (?) on a pdfetex step</blockquote><div><br>Obviously you were busy with the rest of this, but have you had a chance to mention this to Duncan or put a bug in the cabal bug tracker?&nbsp; Or is this a franchise bug?&nbsp; I&#39;m not sure, other than emailing David directly where you would report a bug for the latter.<br>
<br>If we&#39;re going to be serious about pushing franchise on people then we need to get serious about making a community website for it so that bug reports, feature requests, and user questions have an obvious place to go.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
* I left the Cabal setup script (as Setup-cabal.lhs) because I think there is<br>
 &nbsp;some functionality we ought to use from it.</blockquote><div><br>Ah, so I could still build with cabal just by renaming locally.&nbsp; That&#39;s handy.&nbsp; I don&#39;t have franchise installed.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

* Unfortunately, cabal-install passes the -i flag to ghc, with no arguments,<br>
 &nbsp;when building setup.hs. &nbsp;This means that getting a Distribution.Darcs module<br>
 &nbsp;to work with cabal-install may be tricky. &nbsp; It&#39;s not essential, but it could<br>
 &nbsp;have kept the franchise setup.hs tidy, and also facilitated sharing with the<br>
 &nbsp;parallel Cabalisation effort</blockquote><div><br>Looking here: <a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#search-path">http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#search-path</a><br>
It looks like -i resets the search path during compilation.&nbsp; So are you saying, it&#39;s hard to have uninstalled code be part of Setup.hs unless it&#39;s actually at the same directory level or inside of Setup.hs? <br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
* The cabalisation branch version controls the Autoconf.lhs and parameterises<br>
 &nbsp;it with flags. &nbsp;This seems to be a nice alternative to regenerating it.<br>
 &nbsp;Perhaps we could adapt setup.hs accordingly?</blockquote><div><br>Franchise seems to use a template system.&nbsp; File names that end in &quot;.in&quot; are in some sort of template language.&nbsp; If you look in setup.hs you&#39;ll see things like, createFile &quot;foo&quot;.&nbsp; Unlike the name and type suggest createFile isn&#39;t equivalent to the command &#39;touch&#39;.&nbsp; It&#39;s actually going through all the user defined substititions (called replacements), and instantiating a template based on them.&nbsp; Someone should rename &#39;createFile&#39; to something that says, &#39;creates file &#39;foo&#39; from a template named &#39;<a href="http://foo.in">foo.in</a>&#39; by looking at globally defined replacements&#39;.&nbsp; I&#39;d say, instantiateFromTemplate, would be a significantly better name.&nbsp; Also by changing the type so that it takes the template name and the output file name it would be more clear what it does.<br>
<br>Which is another problem I had.&nbsp; Trying to understand what setup.hs does has been difficult.&nbsp; I had to read the entire source of Franchise twice before I could figure out any part of what setup.hs is doing, and I still don&#39;t know how to extend setup.hs.&nbsp; The heavy use of operators and redefined Haskell98 functions made the source hard for me to read[1].&nbsp; Only one module, Util.hs, seems to have any source level documentation.&nbsp; But, all that aside, the really hard to grok part is the undocumented mutually recursive datastructures that sit at the heart of franchise.&nbsp; Unfortunately, as a user of setup.hs you need to understand them because they are exposed at that level currently.&nbsp; I forget what the types are called but it&#39;s the ones that use (:&lt;), (:&lt;-), and (|&lt;-) as constructors.&nbsp; You can see them at use in setup.hs.&nbsp; The impression given there is that they hide some sort of magic.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The patches mostly come from Petr and Ganesh&#39;s cabalisation branch. &nbsp;It&#39;s missing<br>
their Workaround stuff, and has a couple of very minor changes from my end.</blockquote><div><br>Could you please comment on the implications of &quot;missing their Workaround stuff&quot;?&nbsp; I have used mornfall&#39;s version of these changes quite successfully to build darcs sans makefile, so I&#39;m curious.&nbsp; I&#39;m not sure if I should keep working from mornfall&#39;s repo or go with stable + this bundle.<br>
</div></div><br>Thanks Eric!<br>Jason<br><br>[1] endsWith/beginsWith/startsWith all seem to be equivalent to functions found in the Haskell98 report.&nbsp; By giving new definitions of these functions I was tricked into reading their definitions and trying to understand *how* they differ in behavior from the isSuffixOf and isPrefixOf.&nbsp; I have patches that replace the home grown versions with the ones from Data.List if anyone wants them.<br>
</div>