[darcs-users] Building darcs from http://darcs.net with GHC 7.0.1 fails with src/DateMatcher.hs:143:34: Couldn't match expected type `(CalendarTime, CalendarTime)' with actual type `CalendarTime'

Thorkil Naur naur at post11.tele.dk
Thu Dec 9 23:12:33 UTC 2010


Hello,

Attempting to build the darcs from http://darcs.net using

> $ uname -a
> Darwin thorkil-naurs-intel-mac-mini.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
> $ ghc --version
> The Glorious Glasgow Haskell Compilation System, version 7.0.1
> $ 

with GHC from http://haskell.org/ghc/dist/7.0.1/GHC-7.0.1-i386.pkg, I get:

> $ runhaskell Setup.lhs build            
> 
> Setup.lhs:10:34:
>     Warning: In the use of `runTests'
>              (imported from Distribution.Simple, but defined in Distribution.Simple.UserHooks):
>              Deprecated: "Please use the new testing interface instead!"
> Preprocessing library darcs-2.5...
> Preprocessing executables for darcs-2.5...
> Building darcs-2.5...
> [  1 of 154] Compiling Darcs.Witnesses.Show ( src/Darcs/Witnesses/Show.hs, dist/build/Darcs/Witnesses/Show.o )
> [  2 of 154] Compiling Darcs.Patch.OldDate ( src/Darcs/Patch/OldDate.hs, dist/build/Darcs/Patch/OldDate.o )
> [  3 of 154] Compiling Darcs.Patch.Format ( src/Darcs/Patch/Format.hs, dist/build/Darcs/Patch/Format.o )
> [  4 of 154] Compiling Darcs.Patch.RegChars ( src/Darcs/Patch/RegChars.hs, dist/build/Darcs/Patch/RegChars.o )
> [  5 of 154] Compiling IsoDate          ( src/IsoDate.hs, dist/build/IsoDate.o )
> [  6 of 154] Compiling DateMatcher      ( src/DateMatcher.hs, dist/build/DateMatcher.o )
> 
> src/DateMatcher.hs:143:34:
>     Couldn't match expected type `(CalendarTime, CalendarTime)'
>                 with actual type `CalendarTime'
>     Expected type: Text.Parsec.Prim.ParsecT
>                      String
>                      ()
>                      transformers-0.2.2.0:Data.Functor.Identity.Identity
>                      (CalendarTime, CalendarTime)
>       Actual type: Text.ParserCombinators.Parsec.Char.CharParser
>                      () CalendarTime
>     In the second argument of `($)', namely
>       `englishDateTime midnightToday'
>     In the second argument of `DM', namely
>       `(parseDateWith $ englishDateTime midnightToday)'
> $

The configure output is not too comforting either:

> $ runhaskell Setup configure --user
> 
> Setup.lhs:10:34:
>     Warning: In the use of `runTests'
>              (imported from Distribution.Simple, but defined in Distribution.Simple.UserHooks):
>              Deprecated: "Please use the new testing interface instead!"
> Configuring darcs-2.5...
> Warning: This package indirectly depends on multiple versions of the same
> package. This is highly likely to cause a compile failure.
> package deepseq-1.1.0.0 requires containers-0.2.0.1
> package darcs-2.5 requires containers-0.2.0.1
> package regex-posix-0.94.1 requires containers-0.4.0.0
> package regex-base-0.93.1 requires containers-0.4.0.0
> package haskeline-0.6.3.2 requires containers-0.4.0.0
> package hashed-storage-0.5.4 requires containers-0.4.0.0
> package dataenc-0.13.0.4 requires containers-0.4.0.0
> package binary-0.5.0.2 requires containers-0.4.0.0
> package darcs-2.5 requires directory-1.0.1.2
> package tar-0.3.1.0 requires directory-1.1.0.0
> package process-1.0.1.4 requires directory-1.1.0.0
> package mmap-0.5.6 requires directory-1.1.0.0
> package haskeline-0.6.3.2 requires directory-1.1.0.0
> package hashed-storage-0.5.4 requires directory-1.1.0.0
> package darcs-2.5 requires filepath-1.1.0.4
> package tar-0.3.1.0 requires filepath-1.2.0.0
> package process-1.0.1.4 requires filepath-1.2.0.0
> package haskeline-0.6.3.2 requires filepath-1.2.0.0
> package hashed-storage-0.5.4 requires filepath-1.2.0.0
> package directory-1.1.0.0 requires filepath-1.2.0.0
> package directory-1.0.1.2 requires filepath-1.2.0.0
> $ 

I have had some trouble eliminating the dependence on multiple versions
of mtl. I am more wary to attempt something similar for containers,
since darcs requires

> $ grep containers darcs.cabal | head -1
>                    containers >= 0.1 && < 0.4,
> $ 

and containers-0.4.0.0 is actually part of the ghc-7 installation.

Installed packages are:

> $ ghc-pkg list
> /Library/Frameworks/GHC.framework/Versions/7.0.1-i386/usr/lib/ghc-7.0.1/package.conf.d
>    Cabal-1.10.0.0
>    array-0.3.0.2
>    base-4.3.0.0
>    bin-package-db-0.0.0.0
>    bytestring-0.9.1.8
>    containers-0.4.0.0
>    directory-1.1.0.0
>    extensible-exceptions-0.1.1.2
>    ffi-1.0
>    filepath-1.2.0.0
>    ghc-7.0.1
>    ghc-binary-0.5.0.2
>    ghc-prim-0.2.0.0
>    haskell2010-1.0.0.0
>    haskell98-1.1.0.0
>    hpc-0.5.0.6
>    integer-gmp-0.2.0.2
>    old-locale-1.0.0.2
>    old-time-1.0.0.6
>    pretty-1.0.1.2
>    process-1.0.1.4
>    random-1.0.0.3
>    rts-1.0
>    template-haskell-2.5.0.0
>    time-1.2.0.3
>    unix-2.4.1.0
> /Users/thorkilnaur/.ghc/i386-darwin-7.0.1/package.conf.d
>    HUnit-1.2.2.1
>    binary-0.5.0.2
>    containers-0.2.0.1
>    dataenc-0.13.0.4
>    deepseq-1.1.0.0
>    directory-1.0.1.2
>    filepath-1.1.0.4
>    hashed-storage-0.5.4
>    haskeline-0.6.3.2
>    html-1.0.1.2
>    mmap-0.5.6
>    mtl-1.1.1.1
>    parsec-3.0.1
>    regex-base-0.93.1
>    regex-compat-0.92
>    regex-posix-0.94.1
>    syb-0.3
>    tar-0.3.1.0
>    text-0.7.0.1
>    transformers-0.2.2.0
>    utf8-string-0.3.6
>    zlib-0.5.2.0
> $ 

Any suggestions on how to proceed in this matter would be most welcome.

Thanks and best regards
Thorkil


More information about the darcs-users mailing list