From fb4ea7609d1d47e95b14e55f5179deb4f8dcbc5f Mon Sep 17 00:00:00 2001 From: Lennart Kolmodin <kolmodin@gmail.com> Date: Mon, 8 Feb 2016 22:09:16 +0100 Subject: [PATCH] Move end of {-# RULES #-} to be more forgiving for CPP This fixes #105. Older GHC versions + clang ran into trouble, which this commit fixes. --- binary.cabal | 2 +- changelog.md | 5 +++++ src/Data/Binary/Get/Internal.hs | 4 +--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/binary.cabal b/binary.cabal index 5b01fba..b11a525 100644 --- a/binary.cabal +++ b/binary.cabal @@ -1,5 +1,5 @@ name: binary -version: 0.8.2.0 +version: 0.8.2.1 license: BSD3 license-file: LICENSE author: Lennart Kolmodin <kolmodin@gmail.com> diff --git a/changelog.md b/changelog.md index 669b5d7..2a4debd 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,11 @@ binary ====== +binary-0.8.2.1 +-------------- + +- Fix compilation error when using older GHC versions and clang. clang barfs on some of its CPP input (#105). + binary-0.8.2.0 -------------- diff --git a/src/Data/Binary/Get/Internal.hs b/src/Data/Binary/Get/Internal.hs index 944a2ce..07d4177 100644 --- a/src/Data/Binary/Get/Internal.hs +++ b/src/Data/Binary/Get/Internal.hs @@ -398,9 +398,7 @@ readN !n f = ensureN n >> unsafeReadN n f {-# RULES "readN/readN merge" forall n m f g. - apG (readN n f) (readN m g) = readN (n+m) (\bs -> f bs $ g (B.unsafeDrop n bs)) - - #-} + apG (readN n f) (readN m g) = readN (n+m) (\bs -> f bs $ g (B.unsafeDrop n bs)) #-} -- | Ensure that there are at least @n@ bytes available. If not, the -- computation will escape with 'Partial'. -- GitLab