mirror of
https://github.com/ilyakooo0/secp256k1-haskell.git
synced 2024-08-16 07:40:40 +03:00
amend bounds, bump base to 8.0 min, CPP semigroup and base16
remove spurious use of <> relax unliftio to unliftio-core fix bounds for lts-9.0
This commit is contained in:
parent
5c6bc5601e
commit
c038c74ac6
@ -1,4 +1,4 @@
|
||||
cabal-version: 2.0
|
||||
cabal-version: 1.24
|
||||
|
||||
-- This file has been generated from package.yaml by hpack version 0.33.0.
|
||||
--
|
||||
@ -39,16 +39,16 @@ library
|
||||
pkgconfig-depends:
|
||||
libsecp256k1
|
||||
build-depends:
|
||||
QuickCheck
|
||||
, base >=4.8 && <5
|
||||
, base16-bytestring
|
||||
, bytestring
|
||||
, cereal
|
||||
, deepseq
|
||||
, entropy
|
||||
, hashable
|
||||
, string-conversions
|
||||
, unliftio
|
||||
QuickCheck >=2.9.2 && <2.15
|
||||
, base >=4.9 && <5
|
||||
, base16-bytestring >=0.1.1.6 && <1.1
|
||||
, bytestring >=0.10.8 && <0.11
|
||||
, cereal >=0.5.4 && <0.6
|
||||
, deepseq >=1.4.2 && <1.5
|
||||
, entropy >=0.3.8 && <0.5
|
||||
, hashable >=1.2.6 && <1.4
|
||||
, string-conversions >=0.4 && <0.5
|
||||
, unliftio-core >=0.1.0 && <0.3
|
||||
default-language: Haskell2010
|
||||
|
||||
test-suite spec
|
||||
|
@ -116,8 +116,14 @@ instance Serialize CompactSig where
|
||||
get = CompactSig <$> getByteString 64
|
||||
|
||||
decodeHex :: ConvertibleStrings a ByteString => a -> Maybe ByteString
|
||||
#if MIN_VERSION_base16_bytestring(1,0,0)
|
||||
decodeHex str = case B16.decode $ cs str of
|
||||
Right bs -> Just bs
|
||||
Left _ -> Nothing
|
||||
#else
|
||||
decodeHex str = if BS.null r then Just bs else Nothing where
|
||||
(bs, r) = B16.decode $ cs str
|
||||
#endif
|
||||
|
||||
instance Read PubKey where
|
||||
readPrec = do
|
||||
|
@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-|
|
||||
Module : Crypto.Secp256k1.Internal
|
||||
License : UNLICENSE
|
||||
@ -61,7 +60,7 @@ uncompressed = 0x0002
|
||||
isSuccess :: Ret -> Bool
|
||||
isSuccess 0 = False
|
||||
isSuccess 1 = True
|
||||
isSuccess n = error $ "isSuccess expected 0 or 1 but got " <> show n
|
||||
isSuccess n = error $ "isSuccess expected 0 or 1 but got " ++ show n
|
||||
|
||||
unsafeUseByteString :: ByteString -> ((Ptr a, CSize) -> IO b) -> IO b
|
||||
unsafeUseByteString bs f =
|
||||
|
Loading…
Reference in New Issue
Block a user