packages/binary.git
3 years agoAdd arbitrary for Action in Arbitrary instance. 0.8.0.1
Lennart Kolmodin [Fri, 22 Jan 2016 21:09:25 +0000 (22:09 +0100)] 
Add arbitrary for Action in Arbitrary instance.

3 years agoTurn on more warnings if ghc >= 7.11.
Lennart Kolmodin [Thu, 21 Jan 2016 10:24:39 +0000 (11:24 +0100)] 
Turn on more warnings if ghc >= 7.11.

3 years agoBump to 0.8.0.1.
Lennart Kolmodin [Thu, 21 Jan 2016 09:45:22 +0000 (10:45 +0100)] 
Bump to 0.8.0.1.

3 years agoAdd @dcoutts's comments regarding accursedUnutterablePerformIO.
Lennart Kolmodin [Mon, 18 Jan 2016 22:15:55 +0000 (23:15 +0100)] 
Add @dcoutts's comments regarding accursedUnutterablePerformIO.

3 years agoUse accursedUnutterablePerformIO rather than inlinePerformIO.
Lennart Kolmodin [Sun, 20 Dec 2015 22:29:38 +0000 (23:29 +0100)] 
Use accursedUnutterablePerformIO rather than inlinePerformIO.

Let's share the address space with a malevolent agent of chaos.

3 years agoClean up old CPP code.
Lennart Kolmodin [Sun, 20 Dec 2015 22:08:11 +0000 (23:08 +0100)] 
Clean up old CPP code.

3 years agoChangelog update. binary-0.8.0.0-release
Lennart Kolmodin [Sun, 20 Dec 2015 21:53:43 +0000 (22:53 +0100)] 
Changelog update.

3 years agoRemove attempt to do clever fusion of code in applicative style.
Lennart Kolmodin [Sun, 20 Dec 2015 21:37:27 +0000 (22:37 +0100)] 
Remove attempt to do clever fusion of code in applicative style.

Removing as it complicates binary and it's very hard for client code to
trigger.

3 years agoMerge pull request #96 from hvr/pr/semigroup
Lennart Kolmodin [Sun, 20 Dec 2015 20:27:52 +0000 (21:27 +0100)] 
Merge pull request #96 from hvr/pr/semigroup

Define Semigroup instance for base>=4.9

3 years agoUpdate changelog.md with recent changes.
Lennart Kolmodin [Sun, 20 Dec 2015 20:26:52 +0000 (21:26 +0100)] 
Update changelog.md with recent changes.

3 years agoMerge pull request #97 from hvr/pr/redundant-constraints
Lennart Kolmodin [Sun, 20 Dec 2015 20:09:13 +0000 (21:09 +0100)] 
Merge pull request #97 from hvr/pr/redundant-constraints

Drop redundant constraints

3 years agoMerge pull request #93 from hvr/pr/canonical-monad-instances
Lennart Kolmodin [Sun, 20 Dec 2015 18:50:23 +0000 (19:50 +0100)] 
Merge pull request #93 from hvr/pr/canonical-monad-instances

Canonicalise Monad instances

3 years agoMerge pull request #84 from phadej/fixed
Lennart Kolmodin [Sun, 20 Dec 2015 17:53:06 +0000 (18:53 +0100)] 
Merge pull request #84 from phadej/fixed

Data.Fixed instance

3 years agoDrop redundant constraints
Herbert Valerio Riedel [Sat, 19 Dec 2015 10:34:52 +0000 (11:34 +0100)] 
Drop redundant constraints

GHC HEAD warns about these

3 years agoDefine Semigroup instance for base>=4.9
Herbert Valerio Riedel [Sat, 19 Dec 2015 10:23:22 +0000 (11:23 +0100)] 
Define Semigroup instance for base>=4.9

This makes `binary` `-Wcompat`-clean for GHC 8.0

3 years agoCanonicalise Monad instances
Herbert Valerio Riedel [Tue, 24 Nov 2015 13:49:03 +0000 (14:49 +0100)] 
Canonicalise Monad instances

This avoids potential performance issues as well as
future proofing code.

3 years agoMerge pull request #95 from ezyang/binary-splitg
Lennart Kolmodin [Fri, 18 Dec 2015 15:00:20 +0000 (16:00 +0100)] 
Merge pull request #95 from ezyang/binary-splitg

Split GBinary into GBinaryGet and GBinaryPut, speeds up compilation.

3 years agoSplit GBinary into GBinaryGet and GBinaryPut, speeds up compilation.
Edward Z. Yang [Fri, 18 Dec 2015 01:05:29 +0000 (17:05 -0800)] 
Split GBinary into GBinaryGet and GBinaryPut, speeds up compilation.

Consider:

    {-# LANGUAGE DeriveGeneric #-}
    module A where
    import Data.Binary
    import GHC.Generics
    data T = T
     () () () () () () () () () ()
     () () () () () () () () () ()
     () () () () () () () () () ()
     () () () () () () () () () ()
     () () () () () () () () () ()
     () () () () () () () () () ()
     () () () () () () () () () ()
     () () () () () () () () () ()
     () () () () () () () () () ()
     () () () () () () () () () ()
     deriving Generic
    instance Binary T

Without this patch, on GHC 7.10.2, building this -O2 takes 6.7s.  With
this patch, it takes 1.7s.  Amazing.  (There are modest improvements
with other versions of GHC too.)

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
3 years agoMerge pull request #90 from phadej/since-0.8
Lennart Kolmodin [Fri, 13 Nov 2015 10:17:29 +0000 (11:17 +0100)] 
Merge pull request #90 from phadej/since-0.8

Add since annotations

3 years agoAdd since annotations
Oleg Grenrus [Fri, 13 Nov 2015 05:35:25 +0000 (07:35 +0200)] 
Add since annotations

3 years agoAdd Binary Version compatibility tests
Oleg Grenrus [Wed, 11 Nov 2015 18:18:52 +0000 (20:18 +0200)] 
Add Binary Version compatibility tests

3 years agoAdd Binary (Data.Fixed a) instance
Oleg Grenrus [Tue, 25 Aug 2015 20:08:25 +0000 (23:08 +0300)] 
Add Binary (Data.Fixed a) instance

3 years agoMerge pull request #89 from phadej/bump-0.8
Lennart Kolmodin [Thu, 12 Nov 2015 16:44:39 +0000 (17:44 +0100)] 
Merge pull request #89 from phadej/bump-0.8

Bump version to 0.8.0.0

3 years agoBump version to 0.8.0.0
Oleg Grenrus [Thu, 12 Nov 2015 04:34:22 +0000 (06:34 +0200)] 
Bump version to 0.8.0.0

3 years agoRemove duplicate Binary instance of Version.
Lennart Kolmodin [Wed, 11 Nov 2015 16:26:52 +0000 (17:26 +0100)] 
Remove duplicate Binary instance of Version.

3 years agoMerge branch 'phadej/version'
Lennart Kolmodin [Wed, 11 Nov 2015 15:06:23 +0000 (16:06 +0100)] 
Merge branch 'phadej/version'

3 years agoUse applicative form in 'get' for Version.
Lennart Kolmodin [Wed, 11 Nov 2015 15:05:39 +0000 (16:05 +0100)] 
Use applicative form in 'get' for Version.

3 years agoMerge branch 'feature/void-binary-instance'
Lennart Kolmodin [Wed, 11 Nov 2015 10:51:36 +0000 (11:51 +0100)] 
Merge branch 'feature/void-binary-instance'

3 years agoOnly support Void for >= GHC 7.10.
Lennart Kolmodin [Wed, 11 Nov 2015 10:12:14 +0000 (11:12 +0100)] 
Only support Void for >= GHC 7.10.

3 years agoAttempt to reduce compile time on Travis CI.
Lennart Kolmodin [Thu, 29 Oct 2015 17:14:00 +0000 (18:14 +0100)] 
Attempt to reduce compile time on Travis CI.

As suggested at https://github.com/hvr/multi-ghc-travis, reduce the
effect of bug https://ghc.haskell.org/trac/ghc/ticket/9221.

3 years agoUse Travis CI containers.
Lennart Kolmodin [Thu, 29 Oct 2015 16:20:56 +0000 (17:20 +0100)] 
Use Travis CI containers.

3 years agoAdd Binary Void instance
Brian McKenna [Fri, 23 Oct 2015 03:44:31 +0000 (14:44 +1100)] 
Add Binary Void instance

This is so that we can write and read things like [Void], or (Expr Void)
- something I'm actually doing in Morte.

https://github.com/Gabriel439/Haskell-Morte-Library/pull/26

The reader always fails if you actually try to get an instance of it.
Trying to access a void value should not happen for well-formed
instances, for example:

    *Data.Binary Data.Void> decode $ encode ([] :: [Void]) :: [Void]
    []

3 years agoMerge pull request #86 from basvandijk/optimize-roll
Lennart Kolmodin [Tue, 6 Oct 2015 13:40:17 +0000 (15:40 +0200)] 
Merge pull request #86 from basvandijk/optimize-roll

Optimize roll by using foldl' instead of foldr

3 years agoAdd Binary Version instance
Oleg Grenrus [Fri, 2 Oct 2015 10:10:49 +0000 (13:10 +0300)] 
Add Binary Version instance

3 years agoOptimize roll by using foldl' instead of foldr
Bas van Dijk [Mon, 28 Sep 2015 20:39:28 +0000 (22:39 +0200)] 
Optimize roll by using foldl' instead of foldr

The "roll" benchmarks in the get executable show the difference:

  get roll
  benchmarking roll/foldr
  time                 547.4 ms   (537.8 ms .. 553.5 ms)
                       1.000 R²   (1.000 R² .. 1.000 R²)
  mean                 549.4 ms   (547.2 ms .. 550.4 ms)
  std dev              1.857 ms   (0.0 s .. 1.896 ms)
  variance introduced by outliers: 19% (moderately inflated)

  benchmarking roll/foldl'
  time                 434.7 ms   (426.4 ms .. 443.1 ms)
                       1.000 R²   (1.000 R² .. 1.000 R²)
  mean                 433.7 ms   (432.3 ms .. 434.7 ms)
  std dev              1.472 ms   (0.0 s .. 1.696 ms)
  variance introduced by outliers: 19% (moderately inflated)

The "Integer/decode" benchmark shows the actual decoding speed.
First the old implementation based on foldr:

  get Integer/decode
  benchmarking Integer/decode
  time                 552.9 ms   (540.2 ms .. 569.3 ms)
                       1.000 R²   (1.000 R² .. 1.000 R²)
  mean                 558.2 ms   (556.1 ms .. 559.3 ms)
  std dev              1.824 ms   (0.0 s .. 1.906 ms)
  variance introduced by outliers: 19% (moderately inflated)

The new implementation based on foldl':

  get Integer/decode
  benchmarking Integer/decode
  time                 457.5 ms   (406.2 ms .. 505.6 ms)
                       0.998 R²   (0.994 R² .. 1.000 R²)
  mean                 455.9 ms   (448.3 ms .. 462.3 ms)
  std dev              10.11 ms   (0.0 s .. 11.02 ms)
  variance introduced by outliers: 19% (moderately inflated)

3 years agobenchmark builder: Specify Int as we otherwise default to Integer.
Lennart Kolmodin [Fri, 14 Aug 2015 20:31:12 +0000 (22:31 +0200)] 
benchmark builder: Specify Int as we otherwise default to Integer.

The benchmark executes 25% faster, time which could not be attribute to
the speed of binary itself.

3 years agoRemove unused import.
Lennart Kolmodin [Fri, 14 Aug 2015 20:31:00 +0000 (22:31 +0200)] 
Remove unused import.

3 years agoConditionally include Data.Monoid for older GHC versions.
Lennart Kolmodin [Fri, 14 Aug 2015 20:30:16 +0000 (22:30 +0200)] 
Conditionally include Data.Monoid for older GHC versions.

3 years agoConditionally include Control.Applicative for older GHC versions.
Lennart Kolmodin [Fri, 14 Aug 2015 20:22:42 +0000 (22:22 +0200)] 
Conditionally include Control.Applicative for older GHC versions.

3 years agoConditionally include <$> for older GHC versions.
Lennart Kolmodin [Fri, 14 Aug 2015 10:56:59 +0000 (12:56 +0200)] 
Conditionally include <$> for older GHC versions.

3 years agoAdd new deps to .travis.yml file.
Lennart Kolmodin [Thu, 13 Aug 2015 20:39:01 +0000 (22:39 +0200)] 
Add new deps to .travis.yml file.

Due to the dependency cycle we need to manually preinstall all deps
before we attempt to configure/build binary.

3 years agoAdd benchmark for Generic generated Binary instances.
Lennart Kolmodin [Thu, 13 Aug 2015 20:25:19 +0000 (22:25 +0200)] 
Add benchmark for Generic generated Binary instances.

We use Cabal's PackageDescription as the type to serialize. It is large,
has many levels of data types, and also uses enums and strings. It's a
good stress test.

GenericsBench defines criterion benchmarks for serialization and
deserialization.

In GenericsBenchTypes we derive the Binary instances. PackageDescription
already defines Binary instances for the system installed Binary, but
naturally this won't work for the benchmark - we need our own instances
that are derived from the code in this library.

The data to serialize we get from your
.cabal/package/hackage.haskell.org/ directory, it's data from hackage,
not autogenerated.
GenericsBenchCache makes sure that if we rerun the benchmark we will use
the same PackageDescriptions, even if the user has executed
'cabal update' since the last benchmark run.

3 years agoCompile benchmark get with -Wall.
Lennart Kolmodin [Thu, 13 Aug 2015 20:12:11 +0000 (22:12 +0200)] 
Compile benchmark get with -Wall.

3 years agoStructure the benchmarks in the the "get" bench in groups.
Lennart Kolmodin [Sun, 9 Aug 2015 16:14:28 +0000 (18:14 +0200)] 
Structure the  benchmarks in the the "get" bench in groups.

3 years agoChange the non-allocating benchmarks to allocating.
Lennart Kolmodin [Sun, 9 Aug 2015 16:11:02 +0000 (18:11 +0200)] 
Change the non-allocating benchmarks to allocating.

Previously we had several non-allocating benchmarks.
They were not representative to the most common use case where we want
to save all the decoded input, not just a fraction.
This patch updates the benchmark to save the decoded input in lists.

3 years agoSilence some warnings in benchmarks/Get.hs
Lennart Kolmodin [Sun, 9 Aug 2015 15:49:26 +0000 (17:49 +0200)] 
Silence some warnings in benchmarks/Get.hs

3 years agoMark INLINEs with a phase to remove warning.
Lennart Kolmodin [Thu, 30 Jul 2015 16:56:51 +0000 (18:56 +0200)] 
Mark INLINEs with a phase to remove warning.

The warnings are like this;
Rule "getWord16le/readN" may never fire
  because ‘getWord16le’ might inline first

The RULES do the same thing as the inlining, so either one is fine.
Specifying a phase removes the warning.

3 years agoInline flush late to give the RULES a chanse to act
Lennart Kolmodin [Thu, 30 Jul 2015 16:55:21 +0000 (18:55 +0200)] 
Inline flush late to give the RULES a chanse to act

RULE:
  append flush flush = flush

3 years agoUse GHC 7.10.2 on Travis CI instead of GHC 7.10.1.
Lennart Kolmodin [Thu, 30 Jul 2015 08:17:25 +0000 (10:17 +0200)] 
Use GHC 7.10.2 on Travis CI instead of GHC 7.10.1.

3 years agoBump version to 0.7.6.1.
Lennart Kolmodin [Wed, 29 Jul 2015 17:36:28 +0000 (19:36 +0200)] 
Bump version to 0.7.6.1.

3 years agoMerge pull request #83 from bergmark/ghc72
Lennart Kolmodin [Wed, 29 Jul 2015 17:31:45 +0000 (19:31 +0200)] 
Merge pull request #83 from bergmark/ghc72

Don't mark modules using bytestring as safe on GHC 7.2 to fix compilation

3 years agoDon't mark modules using bytestring as safe on GHC 7.2 to fix compilation
Adam Bergmark [Wed, 29 Jul 2015 15:13:50 +0000 (17:13 +0200)] 
Don't mark modules using bytestring as safe on GHC 7.2 to fix compilation

3 years agoUpdate Travis CI to use GHC 7.8.3 -> 7.8.4.
Lennart Kolmodin [Tue, 28 Jul 2015 11:25:48 +0000 (13:25 +0200)] 
Update Travis CI to use GHC 7.8.3 -> 7.8.4.

3 years agoBump version to 0.7.6.0.
Lennart Kolmodin [Mon, 27 Jul 2015 11:59:19 +0000 (13:59 +0200)] 
Bump version to 0.7.6.0.

4 years agoAdd changelog.md to 'cabal sdist'
Lennart Kolmodin [Wed, 8 Jul 2015 14:10:13 +0000 (16:10 +0200)] 
Add changelog.md to 'cabal sdist'

Should fix issue #80.

4 years agoMerge pull request #77 from mboes/ghc710-warnings
Lennart Kolmodin [Mon, 8 Jun 2015 03:17:31 +0000 (20:17 -0700)] 
Merge pull request #77 from mboes/ghc710-warnings

Fix AMP and Safe Haskell related warnings in GHC 7.10.

4 years agoDeclare a few modules as Safe rather than Trustworthy.
Mathieu Boespflug [Sat, 6 Jun 2015 21:31:29 +0000 (23:31 +0200)] 
Declare a few modules as Safe rather than Trustworthy.

This silences a GHC 7.10 warning that indicates that these modules are
marked trustworthy when in fact they don't need to, since they are safe.

4 years agoFix AMP and Safe Haskell related warnings in GHC 7.10.
Mathieu Boespflug [Sat, 6 Jun 2015 21:30:05 +0000 (23:30 +0200)] 
Fix AMP and Safe Haskell related warnings in GHC 7.10.

4 years agoAdd Show instance for Fingerprint on GHC < 7.8.
Lennart Kolmodin [Wed, 3 Jun 2015 21:46:21 +0000 (14:46 -0700)] 
Add Show instance for Fingerprint on GHC < 7.8.

'forAll' needs Fingerprint to have a Show instance.
Starting from GHC 7.8 (base-4.7) Fingerprint has a Show instance, but
for older versions we need to provide one ourselves.

4 years agoAdd roundtrip tests for GHC.Fingerprint.
Lennart Kolmodin [Wed, 3 Jun 2015 18:52:46 +0000 (11:52 -0700)] 
Add roundtrip tests for GHC.Fingerprint.

4 years agoForce the Fingerprint constructor to reduce memory usage.
Lennart Kolmodin [Wed, 3 Jun 2015 18:50:56 +0000 (11:50 -0700)] 
Force the Fingerprint constructor to reduce memory usage.

The two fields are unpacked, so this saves a couple of words per field
until the Fingerprint value gets used.

4 years agoMerge branch 'instance-fingerprint' of https://github.com/mboes/binary
Lennart Kolmodin [Wed, 3 Jun 2015 18:37:38 +0000 (11:37 -0700)] 
Merge branch 'instance-fingerprint' of https://github.com/mboes/binary

4 years agoBump version to 0.7.5.0 0.7.5.0 binary-0.7.5.0-release
Lennart Kolmodin [Sun, 31 May 2015 15:03:00 +0000 (17:03 +0200)] 
Bump version to 0.7.5.0

and update the changelog.

4 years agoSync dependencies in .travis.yml to binary.cabal
Lennart Kolmodin [Sun, 31 May 2015 14:47:01 +0000 (16:47 +0200)] 
Sync dependencies in .travis.yml to binary.cabal

4 years agoIncrease test coverage for Binary Natural instance.
Lennart Kolmodin [Sun, 31 May 2015 14:41:04 +0000 (16:41 +0200)] 
Increase test coverage for Binary Natural instance.

The arbitrarySizedNatural creates too small Naturals so we didn't test
all code paths. Use a custom generator to get bigger numbers.

4 years agoFix memory leak when decoding Float and Double.
Lennart Kolmodin [Sat, 30 May 2015 14:14:03 +0000 (16:14 +0200)] 
Fix memory leak when decoding Float and Double.

4 years agoPort ensureN to use withInputChunks.
Lennart Kolmodin [Sat, 30 May 2015 12:28:10 +0000 (14:28 +0200)] 
Port ensureN to use withInputChunks.

4 years agoRemove obsolete index.html, Makefiles.
Lennart Kolmodin [Sat, 30 May 2015 11:45:45 +0000 (13:45 +0200)] 
Remove obsolete index.html, Makefiles.

4 years agoFix compilation error on GHC < 7.10.
Lennart Kolmodin [Sat, 30 May 2015 09:58:48 +0000 (11:58 +0200)] 
Fix compilation error on GHC < 7.10.

4 years agoSimplify the skip, get*LazyByteString* functions.
Lennart Kolmodin [Sat, 30 May 2015 09:14:27 +0000 (11:14 +0200)] 
Simplify the skip, get*LazyByteString* functions.

Affects;
 - skip
 - getLazyByteString
 - getLazyByteStringNul
 - getRemainingLazyByteString

These functions all read input chunks until some condition,
reading enough bytes, reaching a NUL character, or it has consumed all
bytes. They're now implemented by withInputChunks.
This fixes a bug where the position in the input previously wasn't
correctly reported if you ran out of input bytes.

Tests have been added for getLazyByteString and skip to Action.hs.
Tests for getLazyByteStringNul and getRemainingLazyByteString already
exist in QC.hs.

4 years agoRefactor and remove compiler warnings from ensureN.
Lennart Kolmodin [Thu, 28 May 2015 19:40:00 +0000 (21:40 +0200)] 
Refactor and remove compiler warnings from ensureN.

4 years agoMake `ensureN` more inliner-friendly...
Francesco Mazzoli [Thu, 28 May 2015 12:38:17 +0000 (14:38 +0200)] 
Make `ensureN` more inliner-friendly...

...by making the common case (when the input is big enough) non-recursive.

4 years agoRemove quadratic behaviour in `ensureN`.
Francesco Mazzoli [Wed, 27 May 2015 22:16:53 +0000 (00:16 +0200)] 
Remove quadratic behaviour in `ensureN`.

Chains of `B.append`s were being created by repeated calls to
`demandInput`.

Try the following program, which writes and read 100MB, to appreciate
the difference:

```
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import Data.Binary (encode, decode)
import Data.Char (ord)

main :: IO ()
main = do

  let inBs = BS.replicate 100000000 (fromIntegral $ ord 'a')
  BSL.writeFile "bs.bin" (encode inBs)
  putStrLn "writing done"

  bin <- BSL.readFile "bs.bin"
  -- This takes around 30 seconds and causes more than 10GB to be
  -- allocated.
  let outBs = decode bin
  print $ inBs == outBs
```

4 years agoInstance for GHC.Fingerprint, which is part of base.
Mathieu Boespflug [Sat, 23 May 2015 21:08:57 +0000 (23:08 +0200)] 
Instance for GHC.Fingerprint, which is part of base.

4 years agoSwitch to arbitrarySizedNatural from QuickCheck >= 2.8
Lennart Kolmodin [Sat, 23 May 2015 14:48:26 +0000 (16:48 +0200)] 
Switch to arbitrarySizedNatural from QuickCheck >= 2.8

arbitrarySizedNatural got implemented in QuickCheck 2.8, so we no longer
need to keep our own implementation.
Bump the dependency on QuickCheck to >= 2.8.

4 years agoBump version to 0.7.4.0
Lennart Kolmodin [Mon, 23 Feb 2015 17:28:42 +0000 (18:28 +0100)] 
Bump version to 0.7.4.0

and update the changelog.

4 years agoMerge pull request #70 from ttuegel/total-char
Lennart Kolmodin [Mon, 23 Feb 2015 11:31:39 +0000 (12:31 +0100)] 
Merge pull request #70 from ttuegel/total-char

Make get :: Get Char total

Fail within the Get monad for some UTF-8 errors

4 years agoMake get :: Get Char total
Thomas Tuegel [Fri, 20 Feb 2015 18:43:59 +0000 (12:43 -0600)] 
Make get :: Get Char total

The old Binary instance for Char used Data.Char.chr, which calls error
if given an invalid code point. The instance is modified to call fail
instead of error on invalid code points, which is total (within the Get
Monad). Calls to error inside Get will escape decodeOrFail.

4 years agoBump version to 0.7.3.0 0.7.3.0 binary-0.7.2.3-release
Lennart Kolmodin [Thu, 22 Jan 2015 17:14:21 +0000 (18:14 +0100)] 
Bump version to 0.7.3.0

4 years agoUpdate changelog.md with changes for 0.7.3.0
Lennart Kolmodin [Thu, 22 Jan 2015 17:13:42 +0000 (18:13 +0100)] 
Update changelog.md with changes for 0.7.3.0

4 years agoMerge pull request #66 from JPMoresmau/master
Lennart Kolmodin [Sat, 17 Jan 2015 16:59:35 +0000 (19:59 +0300)] 
Merge pull request #66 from JPMoresmau/master

Fix doc: Int64 are written as 8 bytes, not 4

4 years agoFix doc: Int64 are written as 8 bytes, not 4
JP Moresmau [Sat, 17 Jan 2015 16:55:51 +0000 (17:55 +0100)] 
Fix doc: Int64 are written as 8 bytes, not 4

4 years agoSilence warning.
Lennart Kolmodin [Sat, 10 Jan 2015 09:51:38 +0000 (12:51 +0300)] 
Silence warning.

4 years agoFix compilation error.
Lennart Kolmodin [Thu, 1 Jan 2015 22:33:47 +0000 (01:33 +0300)] 
Fix compilation error.

arbitrarySizedNatural is only defined when base >= 4.8.

4 years agoAdd instance for Natural.
Lennart Kolmodin [Thu, 1 Jan 2015 18:26:18 +0000 (21:26 +0300)] 
Add instance for Natural.

Natural is a new data type that comes with base-4.8 (GHC 7.10).
We serialize it in the same way as we do with Integer.
Since this is a new data type there are some ugly CPPs to handle whether
Natural is there or not.
Serialization tests have been added as well. Since QuickCheck doesn't yet
implement instance Arbitrary Natural we do a workaround here.
This fixes #63.

4 years agoTravis: Use cabal-1.18 for older ghc versions.
Lennart Kolmodin [Sat, 27 Dec 2014 12:34:38 +0000 (15:34 +0300)] 
Travis: Use cabal-1.18 for older ghc versions.

We use the sandbox feature.

4 years agoAdd GHC 7.10 to test matrix
Lennart Kolmodin [Fri, 26 Dec 2014 17:42:14 +0000 (20:42 +0300)] 
Add GHC 7.10 to test matrix

4 years agoBump version to 0.7.2.3
Lennart Kolmodin [Sat, 13 Dec 2014 21:27:45 +0000 (00:27 +0300)] 
Bump version to 0.7.2.3

4 years agoUpdate changelog for 0.7.2.3
Lennart Kolmodin [Sat, 13 Dec 2014 21:26:48 +0000 (00:26 +0300)] 
Update changelog for 0.7.2.3

4 years agoMerge pull request #62 from hvr/pr-binary
Lennart Kolmodin [Sat, 13 Dec 2014 21:13:17 +0000 (00:13 +0300)] 
Merge pull request #62 from hvr/pr-binary

Remove INLINEs from GBinary/GSum methods

4 years agoRemove INLINEs from GBinary/GSum methods
Herbert Valerio Riedel [Thu, 25 Sep 2014 20:07:13 +0000 (22:07 +0200)] 
Remove INLINEs from GBinary/GSum methods

These interact very badly with GHC 7.9.x's simplifier

See also

 - https://ghc.haskell.org/trac/ghc/ticket/9630 and

 - https://ghc.haskell.org/trac/ghc/ticket/9583

4 years agoBump version to 0.7.2.2.
Lennart Kolmodin [Thu, 25 Sep 2014 19:06:34 +0000 (23:06 +0400)] 
Bump version to 0.7.2.2.

4 years agoMerge pull request #59 from hvr/pr-ghc-base
Lennart Kolmodin [Thu, 25 Sep 2014 18:46:18 +0000 (22:46 +0400)] 
Merge pull request #59 from hvr/pr-ghc-base

Use explicit import-list for `GHC.Base` import

4 years agoAdd -fno-spec-constr when building on Travis CI.
Lennart Kolmodin [Thu, 25 Sep 2014 16:47:03 +0000 (20:47 +0400)] 
Add -fno-spec-constr when building on Travis CI.

It should save a lot of memory, and hopefully make the builds
succeed more often.

4 years agoConditionally instantiate NFData depending on bytestring version.
Lennart Kolmodin [Thu, 25 Sep 2014 13:21:26 +0000 (17:21 +0400)] 
Conditionally instantiate NFData depending on bytestring version.

Should fix #61.

4 years agoGHC < 7.6 fails when hiding a function that doesn't exists.
Lennart Kolmodin [Thu, 25 Sep 2014 12:17:29 +0000 (16:17 +0400)] 
GHC < 7.6 fails when hiding a function that doesn't exists.

4 years agoIn Travis CI, ghc 7.8.2 -> 7.8.3.
Lennart Kolmodin [Thu, 25 Sep 2014 11:52:41 +0000 (15:52 +0400)] 
In Travis CI, ghc 7.8.2 -> 7.8.3.

4 years agoFix compilation issue with criterion-1.
Lennart Kolmodin [Thu, 25 Sep 2014 11:49:53 +0000 (15:49 +0400)] 
Fix compilation issue with criterion-1.

4 years agoUse explicit import-list for `GHC.Base` import
Herbert Valerio Riedel [Wed, 17 Sep 2014 20:48:38 +0000 (22:48 +0200)] 
Use explicit import-list for `GHC.Base` import

`base` is currently being restructured in GHC HEAD which will very likely
break this unqualified `GHC.Base` import. So this simple change will make
that import statement future-proof.

5 years agoSimplify the shrinking of Action in QC tests.
Lennart Kolmodin [Thu, 17 Jul 2014 11:10:43 +0000 (15:10 +0400)] 
Simplify the shrinking of Action in QC tests.