On 2008.05.09 08:52:37 +0930, Levi Stephen <[EMAIL PROTECTED]> scribbled 1.3K 
characters:
> Hi,
>
> I am trying to compile hmp3. I have the version from darcs at
> http://code.haskell.org/~dons/code/hmp3
>
> I am getting the following errors:
>
> Tree.hs:190:14:
>    No instance for (Binary FilePathP)
>      arising from a use of `get' at Tree.hs:190:14-16
>    Possible fix: add an instance declaration for (Binary FilePathP)
>    In a 'do' expression: nm <- get
>    In the expression:
>        do nm <- get
>           i <- get
>           return (File nm i)
>    In the definition of `get':
>        get = do nm <- get
>                 i <- get
>                 return (File nm i)
>
> Tree.hs:236:31:
>    Couldn't match expected type `L.ByteString'
>           against inferred type
> `bytestring-0.9.0.1:Data.ByteString.Lazy.Internal.ByteString'
>    In the second argument of `L.writeFile', namely
>        `(compress (encode s))'
>    In the expression: L.writeFile f (compress (encode s))
>    In the definition of `writeTree':
>        writeTree f s = L.writeFile f (compress (encode s))
>
> Tree.hs:240:46:
>    Couldn't match expected type
> `bytestring-0.9.0.1:Data.ByteString.Lazy.Internal.ByteString'
>           against inferred type `L.ByteString'
>    In the first argument of `decompress', namely `s'
>    In the first argument of `decode', namely `(decompress s)'
>    In the first argument of `return', namely `(decode (decompress s))'
>
> Any help is much appreciated.
>
> Thanks,
> Levi

I don't know about the binary problem (perhaps hmp3 needs a more recent 
Data.Binary than it declares?), but the latter two errors are common and 
unpleasant. They come from various libraries being linked against different 
versions of ByteString. Development versions of Cabal can warn you about this 
in the configure step:

...
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
package hmp3-1.5.1 requires bytestring-0.9.0.1
package zlib-0.4.0.4 requires bytestring-0.9.1.0
package pcre-light-0.3.1 requires bytestring-0.9.1.0
package nanocurses-1.5.1 requires bytestring-0.9.1.0
package binary-0.4.2 requires bytestring-0.9.1.0
....

The solution, currently, is to reinstall all conflicting packages, being very 
careful that they all link in the same version of bytestring.

--
gwern
Clandestine SBS electronic NADDIS Intelligence WHCA Chavez real E.T. boobytraps

Attachment: pgplEYKruZgsh.pgp
Description: PGP signature

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to