[Haskell-beginners] compilation error for jhc

Fabien R theedge456 at free.fr
Sun Jan 24 12:05:16 UTC 2016


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



More information about the Beginners mailing list