packages feed

RLP 1.0.0 → 1.0.1

raw patch · 2 files changed

+12/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Serialize.RLP: instance Data.Serialize.RLP.RLPSerialize GHC.Base.String

Files

RLP.cabal view
@@ -1,7 +1,7 @@ Name:                   RLP-Version:                1.0.0-Author:                 Javier Sagredo <jasagredo@gmail.com>-Maintainer:             Javier Sagredo <jasagredo@gmail.com>+Version:                1.0.1+Author:                 Javier Sagredo <jasataco@gmail.com>+Maintainer:             Javier Sagredo <jasataco@gmail.com> License:                LGPL-3 License-File:           LICENSE Homepage:		https://github.com/jasagredo/RLP
src/Data/Serialize/RLP.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE FlexibleInstances #-} -- | -- Module      : Data.Serialize.RLP -- License     : LGPL-3 (see LICENSE)@@ -128,7 +129,7 @@  -- Serializing lists implies making a list with the serialization -- of each element-instance RLPSerialize a => RLPSerialize [a] where+instance {-# OVERLAPPABLE #-} RLPSerialize a => RLPSerialize [a] where   toRLP = RLPL . map toRLP    fromRLP (RLPL x) = map fromRLP x@@ -144,6 +145,13 @@   fromRLP x     | x == toRLP True = True     | otherwise       = False++-- Strings are serialized as ByteStrings+instance {-# OVERLAPPING #-} RLPSerialize String where+  toRLP = RLPB . toByteStringS+  +  fromRLP (RLPB x) = fromByteStringS x+  fromRLP _        = undefined  -- Chars are just length-one strings instance RLPSerialize Char where