Skip to content

Commit

Permalink
Updated to latest released versions of all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tittoassini committed Aug 30, 2017
1 parent 7b18804 commit fdf31fb
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 30 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0.1.1
Switched to the newly hackage-released 'serialise' package from the previously unreleased 'binary-serialise-cbor' package
Updated all packages to the latest available version

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ Time and size benchmarks for the following Haskell serialization libraries:

| Package | Laziness | Compatibility |
| --- | --- | --- |
| [store-0.4.2](https://hackage.haskell.org/package/store) | Strict | Haskell-Same-Architecture |
| [store-0.4.3.1](https://hackage.haskell.org/package/store) | Strict | Haskell-Same-Architecture |
| [packman-0.3.0](http://hackage.haskell.org/package/packman) | Lazy | Haskell-Same-Architecture |
| [cereal-0.5.4.0](http://hackage.haskell.org/package/cereal) | Strict | Haskell |
| [binary-0.8.5.1](http://hackage.haskell.org/package/binary) | Lazy | Haskell |
| [binary-serialise-cbor-0.1.1.0](https://github.com/well-typed/binary-serialise-cbor) | Lazy | Multi-Language |
| [flat-0.2.2](https://github.com/tittoassini/flat) | Strict | Multi-Language |
| [flat-0.3](https://github.com/tittoassini/flat) | Strict | Multi-Language |

Compatibility Levels (lowest to highest):
* Haskell-Same-Architecture
Expand Down
2 changes: 1 addition & 1 deletion report.json

Large diffs are not rendered by default.

13 changes: 4 additions & 9 deletions serialization.cabal
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
name: serialization
version: 0.1.0.0
-- synopsis:
-- description:
-- license:
version: 0.1.1
synopsis: Time and size benchmarks for the most popular Haskell serialization libraries
license-file: LICENSE
author: Ömer Sinan Ağacan
maintainer: [email protected]
-- copyright:
-- category:
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10

library
Expand All @@ -25,7 +20,7 @@ benchmark all
QuickCheck,
base >=4.8 && <4.10,
binary >=0.8 && <0.9,
binary-serialise-cbor,
serialise,
bytestring,
cereal >=0.5.1 && <0.6,
containers >= 0.5.6.2,
Expand All @@ -42,4 +37,4 @@ benchmark all
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall -fno-warn-orphans -O2
--ghc-options: -Wall -O2 -ddump-simpl -dsuppress-idinfo -ddump-to-file
--ghc-options: -Wall -O2 -ddump-simpl -dsuppress-idinfo -ddump-to-file
3 changes: 2 additions & 1 deletion src/Dataset.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
module Dataset(carsData,irisData) where
import Control.DeepSeq
import qualified Data.Binary as B
import Data.Binary.Serialise.CBOR as CBOR
-- import Data.Binary.Serialise.CBOR as CBOR
import Codec.Serialise as CBOR
import qualified Data.Flat as F
import qualified Data.Serialize as C
import qualified Data.Store as S
Expand Down
9 changes: 5 additions & 4 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import Data.Typeable
import Criterion.Types
-- import Data.Bifunctor
import qualified Data.Binary as B
import Data.Binary.Serialise.CBOR as CBOR
-- import Data.Binary.Serialise.CBOR as CBOR
import Codec.Serialise as CBOR
-- import Data.List
-- import Data.Ord
import GHC.Generics
Expand Down Expand Up @@ -182,17 +183,17 @@ instance (S.Store a, NFData a) => Serialize PkgStore a where

instance (F.Flat a, NFData a) => Serialize PkgFlat a where
{-# NOINLINE serialize #-}
serialize _ = return . force . LBS.toStrict . F.flat
serialize _ = return . force . F.flat
{-# NOINLINE deserialize #-}
deserialize _ = return . force . fromRight . F.unflat . LBS.fromStrict
deserialize _ = return . force . fromRight . F.unflat

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)]
pkgs = [("store",serialize PkgStore,deserialize PkgStore)
,("flat",serialize PkgFlat,deserialize PkgFlat)
,("binary",serialize PkgBinary,deserialize PkgBinary)
,("cereal",serialize PkgCereal,deserialize PkgCereal)
,("packman",serialize PkgPackman,deserialize PkgPackman)
,("binary_serialise_cbor",serialize PkgCBOR,deserialize PkgCBOR)
,("serialise",serialize PkgCBOR,deserialize PkgCBOR)
]

prop :: Serialize lib (BinTree Int) => lib -> Property
Expand Down
21 changes: 8 additions & 13 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ghc 7.10.3
resolver: lts-6.30
resolver: lts-6.35

# ghc 8.0.1
# PROB: packman won't compile
Expand All @@ -9,24 +9,19 @@ resolver: lts-6.30
packages:
- '.'

# - ../flat

- location:
git: https://github.com/well-typed/binary-serialise-cbor
commit: bfbbc3cc741ffa8a6ad3a23ae77f004e8c0e3620
extra-dep: true

flags:
binary-serialise-cbor:
newtime15: true
serialise:
newtime15: true

extra-deps:
- packman-0.3.0
- binary-0.8.5.1
- cereal-0.5.4.0
- flat-0.2.2
- store-0.4.2
- store-core-0.4
- flat-0.3
- store-0.4.3.1
- store-core-0.4.1
- serialise-0.1.0.0
- cborg-0.1.1.0
- th-utilities-0.2.0.1
- datasets-0.2.1
- criterion-1.1.4.0
Expand Down

0 comments on commit fdf31fb

Please sign in to comment.