@@ -22,7 +22,8 @@ import Data.Typeable
22
22
import Criterion.Types
23
23
-- import Data.Bifunctor
24
24
import qualified Data.Binary as B
25
- import Data.Binary.Serialise.CBOR as CBOR
25
+ -- import Data.Binary.Serialise.CBOR as CBOR
26
+ import Codec.Serialise as CBOR
26
27
-- import Data.List
27
28
-- import Data.Ord
28
29
import GHC.Generics
@@ -182,17 +183,17 @@ instance (S.Store a, NFData a) => Serialize PkgStore a where
182
183
183
184
instance (F. Flat a , NFData a ) => Serialize PkgFlat a where
184
185
{-# NOINLINE serialize #-}
185
- serialize _ = return . force . LBS. toStrict . F. flat
186
+ serialize _ = return . force . F. flat
186
187
{-# NOINLINE deserialize #-}
187
- deserialize _ = return . force . fromRight . F. unflat . LBS. fromStrict
188
+ deserialize _ = return . force . fromRight . F. unflat
188
189
189
190
pkgs :: (NFData a ,C. Serialize a ,Typeable a ,Serialise a ,S. Store a ,F. Flat a ,B. Binary a ) => [(String ,a -> IO BS. ByteString ,BS. ByteString -> IO a )]
190
191
pkgs = [(" store" ,serialize PkgStore ,deserialize PkgStore )
191
192
,(" flat" ,serialize PkgFlat ,deserialize PkgFlat )
192
193
,(" binary" ,serialize PkgBinary ,deserialize PkgBinary )
193
194
,(" cereal" ,serialize PkgCereal ,deserialize PkgCereal )
194
195
,(" packman" ,serialize PkgPackman ,deserialize PkgPackman )
195
- ,(" binary_serialise_cbor " ,serialize PkgCBOR ,deserialize PkgCBOR )
196
+ ,(" serialise " ,serialize PkgCBOR ,deserialize PkgCBOR )
196
197
]
197
198
198
199
prop :: Serialize lib (BinTree Int ) => lib -> Property
0 commit comments