IntersectMBO / cardano-prelude

A protolude-based custom prelude for the Cardano project
Apache License 2.0
15 stars 11 forks source link

base16-bytestring-1.0.0.0 changed type signature of `decode` function #125

Open mimi1vx opened 3 years ago

mimi1vx commented 3 years ago

while building cardano-node with cabal new-build, build fails on cardano-prelude dependecy with:


src/Cardano/Prelude/Base16.hs:30:22: error:
    • Couldn't match expected type ‘(a, b)’
                  with actual type ‘Either GHC.Base.String ByteString’
    • In the expression: B16.decode $ encodeUtf8 s
      In a pattern binding: (bs, suffix) = B16.decode $ encodeUtf8 s
      In the expression:
        do let (bs, suffix) = B16.decode $ encodeUtf8 s
           unless (BS.null suffix) . Left $ Base16IncorrectSuffix suffix
           pure bs
    • Relevant bindings include
        bs :: a (bound at src/Cardano/Prelude/Base16.hs:30:8)
        suffix :: b (bound at src/Cardano/Prelude/Base16.hs:30:12)
   |
30 |   let (bs, suffix) = B16.decode $ Text.encodeUtf8 s
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mark-stopka commented 3 years ago

Seems it works with combination of master branch of cardano-node and this cherry-picked PR... https://github.com/input-output-hk/cardano-node/pull/1874

mimi1vx commented 3 years ago

@mark-stopka it's new base16-bytestring