Skip to content

Commit

Permalink
Fix build failure on GHC 8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
tdammers committed Apr 29, 2024
1 parent e2d86bb commit 3f0d62f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cardano-crypto-class/src/Cardano/Crypto/KES/CompactSum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -514,5 +514,5 @@ instance (HashAlgorithm h)
fptr <- mallocForeignPtrBytes len
withForeignPtr fptr $ \ptr -> do
pull (castPtr ptr) len
let bs = BS.fromForeignPtr0 fptr len
let bs = BS.fromForeignPtr fptr 0 len
maybe (error "Invalid hash") return $! VerKeyCompactSumKES <$!> hashFromBytes bs
4 changes: 2 additions & 2 deletions cardano-crypto-class/src/Cardano/Crypto/KES/Mock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ instance (KnownNat t) => DirectDeserialise (SignKeyKES (MockKES t)) where
fptr <- mallocForeignPtrBytes len
withForeignPtr fptr $ \ptr ->
pull (castPtr ptr) (fromIntegral len)
let bs = BS.fromForeignPtr0 fptr len
let bs = BS.fromForeignPtr fptr 0 len
maybe (error "directDeserialise @(SignKeyKES (MockKES t))") return $
rawDeserialiseSignKeyMockKES bs

Expand All @@ -230,6 +230,6 @@ instance (KnownNat t) => DirectDeserialise (VerKeyKES (MockKES t)) where
fptr <- mallocForeignPtrBytes len
withForeignPtr fptr $ \ptr ->
pull (castPtr ptr) (fromIntegral len)
let bs = BS.fromForeignPtr0 fptr len
let bs = BS.fromForeignPtr fptr 0 len
maybe (error "directDeserialise @(VerKeyKES (MockKES t))") return $
rawDeserialiseVerKeyKES bs
2 changes: 1 addition & 1 deletion cardano-crypto-class/src/Cardano/Crypto/KES/Sum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -434,5 +434,5 @@ instance (HashAlgorithm h)
fptr <- mallocForeignPtrBytes len
withForeignPtr fptr $ \ptr -> do
pull (castPtr ptr) len
let bs = BS.fromForeignPtr0 fptr len
let bs = BS.fromForeignPtr fptr 0 len
maybe (error "Invalid hash") return $! VerKeySumKES <$!> hashFromBytes bs

0 comments on commit 3f0d62f

Please sign in to comment.