Build Darcs with GHC 6.8.1
Download stable or pre-release darcs source distribution. You need to edit two files, namely aclocal.m4 and autoconf.mk:
- aclocal.m4: add the following before the AC_MSG_RESULT([failed]) line in the WORKAROUND_openFd section:
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 -> Maybe FDType -> FilePath -> IOMode -> Bool -> Bool -> IO Handle
openFd fd x y z a b = GHC.Handle.fdToHandle' fd x b y z a
]]),
- autoconf.mk: add -package containers to GHCFLAGS
- run autoconf
Now you are ready and set to build darcs with GHC 6.8.1. The unstable darcs branch works out of the box with GHC 6.8.1.