AttoBencode 0.2.0.1 → 0.2.1.0
raw patch · 2 files changed
+5/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- AttoBencode.cabal +1/−1
- src/Data/AttoBencode/Types.hs +4/−2
AttoBencode.cabal view
@@ -1,5 +1,5 @@ Name: AttoBencode-Version: 0.2.0.1+Version: 0.2.1.0 Synopsis: Fast Bencode encoding and parsing library Homepage: http://bitbucket.org/FlorianHartwig/attobencode License: BSD3
src/Data/AttoBencode/Types.hs view
@@ -67,9 +67,7 @@ instance ToBencode BValue where toBencode = id--- TODO: make sure these are inlined - instance FromBencode ByteString where fromBencode (BString bs) = Just bs fromBencode _ = Nothing@@ -78,6 +76,9 @@ fromBencode (BInt n) = Just n fromBencode _ = Nothing +instance FromBencode BValue where+ fromBencode = Just+ instance (FromBencode a) => FromBencode (M.Map ByteString a) where fromBencode (BDict d) = traverse fromBencode d fromBencode _ = Nothing@@ -85,6 +86,7 @@ instance (FromBencode a) => FromBencode [a] where fromBencode (BList l) = mapM fromBencode l fromBencode _ = Nothing+ -- | Look up the value corresponding to a (ByteString) key from a dictionary. -- Returns 'Nothing' if the key is not in the dictionary or if the 'BValue'