[Haskell-beginners] compilation error for jhc

David McBride toad3k at gmail.com
Sun Jan 24 13:59:03 UTC 2016


It looks like the binary package got its own instance for the version
datatype.  You could probably make it build by just removing that instance
from Binary.hs.

And I don't want to dissuade you, but unless there is a reason for you to
use jhc, just be aware that ghc has pretty much become the defacto haskell
compiler and the others have started to bit rot.

On Sun, Jan 24, 2016 at 7:05 AM, Fabien R <theedge456 at free.fr> wrote:

> Hello,
> I want to build jhc 0.82 on debian/amd64.
> I downloaded the sources and successfully configured the build.
> The compilation fails with this error:
>
> [149 of 186] Compiling Ho.Binary        ( src/Ho/Binary.hs,
> src/Ho/Binary.o )
>
> src/Ho/Binary.hs:164:10:
>     Duplicate instance declarations:
>       instance [overlap ok] Binary Data.Version.Version
>         -- Defined at src/Ho/Binary.hs:164:10
>       instance [safe] Binary Data.Version.Version
>         -- Defined in `binary-0.8.0.0:Data.Binary.Class'
> Makefile:1441: recipe for target 'jhc' failed
>
> The corresponding source code in src/Ho/Binary.hs is:
>
> import Data.Binary
> import qualified Data.Version
>
> instance Binary Data.Version.Version where
>     put (Data.Version.Version a b) = put a >> put b
>     get = liftM2 Data.Version.Version get get
>
> In the package binary, is this error due to this line ?
>
> import Data.Version (Version(..))
>
> Any hint to solve this ?
>
> --
> Fabien
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160124/4ed16a7e/attachment.html>


More information about the Beginners mailing list