<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>ByteLabs: Build Darcs with GHC 6.8.1</title>
    <link>http://blog.solaris.bytelabs.org/articles/2007/11/22/build-darcs-with-ghc-6-8-1</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>additions to a vast pool of entropy by Igor and Ines</description>
    <item>
      <title>Build Darcs with GHC 6.8.1</title>
      <description>&lt;p&gt;Download stable or pre-release &lt;a href="http//darcs.net"&gt;darcs&lt;/a&gt; source distribution.  You need to edit two files, namely &lt;strong&gt;aclocal.m4&lt;/strong&gt; and &lt;strong&gt;autoconf.mk&lt;/strong&gt;:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;aclocal.m4&lt;/strong&gt;: add the following before the &lt;strong&gt;AC_MSG_RESULT([failed])&lt;/strong&gt; line in the &lt;strong&gt;&lt;span class="caps"&gt;WORKAROUND&lt;/span&gt;_openFd&lt;/strong&gt; section:&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre&gt;
&lt;code&gt;AC_MSG_RESULT([okay])
IMPORT_WORKAROUND([
   import qualified GHC.Handle ( fdToHandle' )
   import System.IO ( Handle, IOMode )
   import System.Posix.Internals ( FDType )
   import qualified GHC.IOBase ( FD )
])
CODE_WORKAROUND([[
  {- 
   Work around change in the GHC.Handle.fdToHandle' API.
  -}
openFd :: GHC.IOBase.FD -&amp;gt; Maybe FDType -&amp;gt; FilePath -&amp;gt; IOMode -&amp;gt; Bool -&amp;gt; Bool -&amp;gt; IO Handle
openFd fd x y z a b = GHC.Handle.fdToHandle' fd x b y z a
]]),&lt;/code&gt;
&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;autoconf.mk&lt;/strong&gt;: add &lt;strong&gt;-package containers&lt;/strong&gt; to &lt;span class="caps"&gt;GHCFLAGS&lt;/span&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;run &lt;strong&gt;autoconf&lt;/strong&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Now you are ready and set to build darcs with &lt;a href="http://www.haskell.org/ghc/download_ghc_681.html"&gt;&lt;span class="caps"&gt;GHC  6&lt;/span&gt;.8.1&lt;/a&gt;. The unstable darcs branch works out of the box with &lt;span class="caps"&gt;GHC 6&lt;/span&gt;.8.1.&lt;/p&gt;</description>
      <pubDate>Thu, 22 Nov 2007 14:25:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:70fd0401-161c-42ce-9f46-7a0f08781ab6</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2007/11/22/build-darcs-with-ghc-6-8-1</link>
      <category>Hacking and Computers</category>
      <category>Haskell</category>
      <category>darcs</category>
    </item>
  </channel>
</rss>
