I'm trying to add cardano-wallet-core as a dependency to my Haskell project, so I can use the servant client. But I get this error when cabal builds the byron-spec-ledger package:

[ 6 of 16] Compiling Byron.Spec.Ledger.Update ( src/Byron/Spec/Ledger/Update.hs, dist/build/Byron/Spec/Ledger/Update.o, dist/build/Byron/Spec/Ledger/Update.dyn_o )

src/Byron/Spec/Ledger/Update.hs:236:10: error:
    Duplicate instance declarations:
      instance Hashable a => Hashable (Set a)
        -- Defined at src/Byron/Spec/Ledger/Update.hs:236:10
      instance Hashable v => Hashable (Set v)
        -- Defined in `hashable-'
236 | instance Hashable a => Hashable (Set a) where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build byron-spec-ledger- (which is required by

My cabal.project looks like this: https://pastebin.com/swdJWBAK

Using GHC 8.10.4.


1 Answer 1


The issue was that in hashable-, the instance was added, and it was also defined in the byron-spec-ledger package.

Adding this constraint to my cabal.project file solved the issue:

    hashable <

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.