mirror of
https://github.com/ilyakooo0/secp256k1-haskell.git
synced 2024-09-11 12:25:38 +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.
|
-- This file has been generated from package.yaml by hpack version 0.33.0.
|
||||||
--
|
--
|
||||||
@ -39,16 +39,16 @@ library
|
|||||||
pkgconfig-depends:
|
pkgconfig-depends:
|
||||||
libsecp256k1
|
libsecp256k1
|
||||||
build-depends:
|
build-depends:
|
||||||
QuickCheck
|
QuickCheck >=2.9.2 && <2.15
|
||||||
, base >=4.8 && <5
|
, base >=4.9 && <5
|
||||||
, base16-bytestring
|
, base16-bytestring >=0.1.1.6 && <1.1
|
||||||
, bytestring
|
, bytestring >=0.10.8 && <0.11
|
||||||
, cereal
|
, cereal >=0.5.4 && <0.6
|
||||||
, deepseq
|
, deepseq >=1.4.2 && <1.5
|
||||||
, entropy
|
, entropy >=0.3.8 && <0.5
|
||||||
, hashable
|
, hashable >=1.2.6 && <1.4
|
||||||
, string-conversions
|
, string-conversions >=0.4 && <0.5
|
||||||
, unliftio
|
, unliftio-core >=0.1.0 && <0.3
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
test-suite spec
|
test-suite spec
|
||||||
|
@ -116,8 +116,14 @@ instance Serialize CompactSig where
|
|||||||
get = CompactSig <$> getByteString 64
|
get = CompactSig <$> getByteString 64
|
||||||
|
|
||||||
decodeHex :: ConvertibleStrings a ByteString => a -> Maybe ByteString
|
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
|
decodeHex str = if BS.null r then Just bs else Nothing where
|
||||||
(bs, r) = B16.decode $ cs str
|
(bs, r) = B16.decode $ cs str
|
||||||
|
#endif
|
||||||
|
|
||||||
instance Read PubKey where
|
instance Read PubKey where
|
||||||
readPrec = do
|
readPrec = do
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-|
|
{-|
|
||||||
Module : Crypto.Secp256k1.Internal
|
Module : Crypto.Secp256k1.Internal
|
||||||
License : UNLICENSE
|
License : UNLICENSE
|
||||||
@ -61,7 +60,7 @@ uncompressed = 0x0002
|
|||||||
isSuccess :: Ret -> Bool
|
isSuccess :: Ret -> Bool
|
||||||
isSuccess 0 = False
|
isSuccess 0 = False
|
||||||
isSuccess 1 = True
|
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 :: ByteString -> ((Ptr a, CSize) -> IO b) -> IO b
|
||||||
unsafeUseByteString bs f =
|
unsafeUseByteString bs f =
|
||||||
|
Loading…
Reference in New Issue
Block a user