haskoin / secp256k1-haskell

Haskell bindings for secp256k1 library
Other
24 stars 36 forks source link

build fails with base16-1.0 #41

Closed juhp closed 1 year ago

juhp commented 1 year ago
       Building library for secp256k1-haskell-0.6.1..
       [1 of 3] Compiling Crypto.Secp256k1.Internal
       [2 of 3] Compiling Crypto.Secp256k1

       /var/stackage/work/unpack-dir/unpacked/secp256k1-haskell-0.6.1-c5322035685245856528e1a31a23f321843f65a3b0394fd5dfe059e4f5673faf/src/Crypto/Secp256k1.hs:119:3: error: [GHC-83865]
           • Couldn't match expected type ‘ByteString’
                         with actual type ‘Either a0 ByteString’
           • In the pattern: Right bs
             In a case alternative: Right bs -> Just bs
             In the expression:
               case B16.decodeBase16 $ cs str of
                 Right bs -> Just bs
                 Left _ -> Nothing
           |
       119 |   Right bs -> Just bs
           |   ^^^^^^^^

       /var/stackage/work/unpack-dir/unpacked/secp256k1-haskell-0.6.1-c5322035685245856528e1a31a23f321843f65a3b0394fd5dfe059e4f5673faf/src/Crypto/Secp256k1.hs:120:3: error: [GHC-83865]
           • Couldn't match expected type ‘ByteString’
                         with actual type ‘Either a1 b0’
           • In the pattern: Left _
             In a case alternative: Left _ -> Nothing
             In the expression:
               case B16.decodeBase16 $ cs str of
                 Right bs -> Just bs
                 Left _ -> Nothing
           |
       120 |   Left _ -> Nothing
           |   ^^^^^^
juhp commented 1 year ago

Also btw https://github.com/haskoin/secp256k1-haskell.git/issues is not a valid url (in .cabal)

jprupp commented 1 year ago

Both issues are fixed in version 7.0, released to Hackage.

The main problem reported here is not due to GHC 9.6, but to a change of the API for package base16 after version 1.0.

juhp commented 1 year ago

Thanks