packages feed

secp256k1 1.1.1 → 1.1.2

raw patch · 3 files changed

+18/−26 lines, 3 files

Files

CHANGELOG.md view
@@ -4,9 +4,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 1.1.2+### Changed+- Simplify `Show` and `Read` instances.+ ## 1.1.1 ### Removed-- Old obvious installation instructions from README.md file.+- Old obvious installation instructions from `README.md` file.  ### Changed - Fix arbitrary instances such that unwanted colissions are less likely.@@ -19,9 +23,9 @@  ## 1.0.0 [YANKED] ### Added-- Changelog+- Changelog.  ### Changed-- Show/Read instances now isomorphic to Haskell code.-- Semantic versioning-- Hspec tests+- `Show`/`Read` instances now isomorphic to Haskell code.+- Semantic versioning.+- `Hspec` tests.
secp256k1.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 3b4267a03dc5a6d3d9b4a1009abd74e95edd27a71a7329bb23aa5dfae79fc142+-- hash: 6b0890233b4c63ab7b0156e546e6eb7324e5726911263d1997a28f4cea6904c5  name:           secp256k1-version:        1.1.1+version:        1.1.2 synopsis:       Bindings for secp256k1 library from Bitcoin Core description:    Sign and verify signatures using the very fast C secp256k1 library from Pieter Wuille. Has Haskell types and abstractions for keys and signatures. category:       Crypto
src/Crypto/Secp256k1.hs view
@@ -85,8 +85,7 @@     (bs, r) = B16.decode $ cs str  instance Read PubKey where-    readPrec = parens $ do-        Ident "fromString" <- lexP+    readPrec = do         String str <- lexP         maybe pfail return $ importPubKey =<< decodeHex str @@ -95,12 +94,10 @@         e = error "Could not decode public key from hex string"  instance Show PubKey where-    showsPrec d k = showParen (d > 10) $-        showString "fromString " . shows (B16.encode $ exportPubKey True k)+    showsPrec _ = shows . B16.encode . exportPubKey True  instance Read Msg where     readPrec = parens $ do-        Ident "fromString" <- lexP         String str <- lexP         maybe pfail return $ msg =<< decodeHex str @@ -109,12 +106,10 @@         e = error "Could not decode message from hex string"  instance Show Msg where-    showsPrec d m = showParen (d > 10) $-        showString "fromString " . shows (B16.encode $ getMsg m)+    showsPrec _ = shows . B16.encode . getMsg  instance Read Sig where     readPrec = parens $ do-        Ident "fromString" <- lexP         String str <- lexP         maybe pfail return $ importSig =<< decodeHex str @@ -123,8 +118,7 @@         e = error "Could not decode signature from hex string"  instance Show Sig where-    showsPrec d s = showParen (d > 10) $-        showString "fromString " . shows (B16.encode $ exportSig s)+    showsPrec _ = shows . B16.encode . exportSig  recSigFromString :: String -> Maybe RecSig recSigFromString str = do@@ -134,7 +128,6 @@  instance Read RecSig where     readPrec = parens $ do-        Ident "fromString" <- lexP         String str <- lexP         maybe pfail return $ recSigFromString str @@ -144,12 +137,10 @@         e = error "Could not decode signature from hex string"  instance Show RecSig where-    showsPrec d s = showParen (d > 10) $-        showString "fromString " . shows (B16.encode . encode $ exportCompactRecSig s)+    showsPrec _ = shows . B16.encode . encode . exportCompactRecSig  instance Read SecKey where     readPrec = parens $ do-        Ident "fromString" <- lexP         String str <- lexP         maybe pfail return $ secKey =<< decodeHex str @@ -158,12 +149,10 @@         e = error "Colud not decode secret key from hex string"  instance Show SecKey where-    showsPrec d k = showParen (d > 10) $-        showString "fromString " . shows (B16.encode $ getSecKey k)+    showsPrec _ = shows . B16.encode . getSecKey  instance Read Tweak where     readPrec = parens $ do-        Ident "fromString" <- lexP         String str <- lexP         maybe pfail return $ tweak =<< decodeHex str @@ -172,8 +161,7 @@         e = error "Could not decode tweak from hex string"  instance Show Tweak where-    showsPrec d k = showParen (d > 10) $-        showString "fromString " . shows (B16.encode $ getTweak k)+    showsPrec _ = shows . B16.encode . getTweak  instance Eq PubKey where     fp1 == fp2 = getPubKey fp1 == getPubKey fp2