diff options
author | Gabor Pali <pgj@FreeBSD.org> | 2015-08-20 23:02:14 +0000 |
---|---|---|
committer | Gabor Pali <pgj@FreeBSD.org> | 2015-08-20 23:02:14 +0000 |
commit | 39b8e49140afdb1d1d001c477befb4b05efa7fc3 (patch) | |
tree | 607a5ca77efd301a2b4dc49b05d108829fcffa77 /converters/hs-aeson | |
parent | 75b64b1cb42c127b71646f039269eb7bd560d8ef (diff) | |
download | ports-39b8e49140afdb1d1d001c477befb4b05efa7fc3.tar.gz ports-39b8e49140afdb1d1d001c477befb4b05efa7fc3.zip |
Notes
Diffstat (limited to 'converters/hs-aeson')
-rw-r--r-- | converters/hs-aeson/Makefile | 9 | ||||
-rw-r--r-- | converters/hs-aeson/distinfo | 4 | ||||
-rw-r--r-- | converters/hs-aeson/files/patch-Data__Aeson__Parser__Internal.hs | 76 | ||||
-rw-r--r-- | converters/hs-aeson/files/patch-aeson.cabal | 11 |
4 files changed, 6 insertions, 94 deletions
diff --git a/converters/hs-aeson/Makefile b/converters/hs-aeson/Makefile index 0f380f700a5b..8cd0e7c8c45c 100644 --- a/converters/hs-aeson/Makefile +++ b/converters/hs-aeson/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= aeson -PORTVERSION= 0.7.0.6 -PORTREVISION= 1 +PORTVERSION= 0.8.0.2 CATEGORIES= converters haskell MAINTAINER= haskell@FreeBSD.org @@ -10,9 +9,9 @@ COMMENT= Fast JSON parsing and encoding LICENSE= BSD3CLAUSE -USE_CABAL= attoparsec>=0.10.4.0 dlist>=0.2 hashable>=1.1.2.0 mtl \ - scientific>=0.3.1 syb text>=0.11.1.0 unordered-containers>=0.2.3.0 \ - vector>=0.7.1 +USE_CABAL= attoparsec>=0.11.3.4 dlist>=0.2 hashable>=1.1.2.0 mtl \ + old-locale scientific>=0.3.1 syb text>=1.1.1.0 \ + unordered-containers>=0.2.3.0 vector>=0.7.1 .include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" .include <bsd.port.mk> diff --git a/converters/hs-aeson/distinfo b/converters/hs-aeson/distinfo index c64246dd65be..5d67e7c53185 100644 --- a/converters/hs-aeson/distinfo +++ b/converters/hs-aeson/distinfo @@ -1,2 +1,2 @@ -SHA256 (cabal/aeson-0.7.0.6.tar.gz) = 645531759ba18105cadf024415e1be60353ad704ac686ff5ee67c7f4754d4e6f -SIZE (cabal/aeson-0.7.0.6.tar.gz) = 141565 +SHA256 (cabal/aeson-0.8.0.2.tar.gz) = 0707588dfb5fdfe787eba5b3d5a9950acb224a8dae9dcdcfc9c974ae2b6788d5 +SIZE (cabal/aeson-0.8.0.2.tar.gz) = 143850 diff --git a/converters/hs-aeson/files/patch-Data__Aeson__Parser__Internal.hs b/converters/hs-aeson/files/patch-Data__Aeson__Parser__Internal.hs deleted file mode 100644 index 759362be0d67..000000000000 --- a/converters/hs-aeson/files/patch-Data__Aeson__Parser__Internal.hs +++ /dev/null @@ -1,76 +0,0 @@ ---- ./Data/Aeson/Parser/Internal.hs.orig 2014-05-16 17:43:52.000000000 +0200 -+++ ./Data/Aeson/Parser/Internal.hs 2014-07-12 19:54:00.000000000 +0200 -@@ -41,25 +41,29 @@ - (Builder, byteString, toLazyByteString, charUtf8, word8) - #endif - --import Control.Applicative ((*>), (<$>), (<*), liftA2, pure) -+import Control.Applicative ((*>), (<$>), (<*), (<|>), liftA2, pure) -+import Control.Monad (when, void) - import Data.Aeson.Types (Result(..), Value(..)) --import Data.Attoparsec.Char8 (Parser, char, endOfInput, scientific, -- skipSpace, string) -+import Data.Attoparsec.Char8 (Parser, char, endOfInput, isDigit_w8, -+ skipSpace, string, decimal, signed) - import Data.Bits ((.|.), shiftL) - import Data.ByteString (ByteString) - import Data.Char (chr) - import Data.Monoid (mappend, mempty) -+import Data.Scientific (Scientific) - import Data.Text (Text) - import Data.Text.Encoding (decodeUtf8') - import Data.Vector as Vector (Vector, fromList) - import Data.Word (Word8) - import qualified Data.Attoparsec as A -+import qualified Data.Attoparsec.ByteString as I - import qualified Data.Attoparsec.Lazy as L - import qualified Data.Attoparsec.Zepto as Z - import qualified Data.ByteString as B - import qualified Data.ByteString.Lazy as L - import qualified Data.ByteString.Unsafe as B - import qualified Data.HashMap.Strict as H -+import qualified Data.Scientific as Sci - - #define BACKSLASH 92 - #define CLOSE_CURLY 125 -@@ -356,3 +360,40 @@ - #else - peekWord8' = maybe (fail "not enough bytes") return =<< A.peekWord8 - #endif -+ -+scientific :: A.Parser Scientific -+scientific = scientifically id -+ -+-- A strict pair -+data SP = SP !Integer {-# UNPACK #-}!Int -+ -+{-# INLINE scientifically #-} -+scientifically :: (Scientific -> a) -> Parser a -+scientifically h = do -+ let minus = 45 -+ plus = 43 -+ sign <- peekWord8' -+ let !positive = sign == plus || sign /= minus -+ when (sign == plus || sign == minus) $ -+ void $ I.anyWord8 -+ -+ n <- decimal -+ -+ let f fracDigits = SP (B.foldl' step n fracDigits) -+ (negate $ B.length fracDigits) -+ step a w = a * 10 + fromIntegral (w - 48) -+ -+ dotty <- I.peekWord8 -+ -- '.' -> ascii 46 -+ SP c e <- case dotty of -+ Just 46 -> I.anyWord8 *> (f <$> I.takeWhile isDigit_w8) -+ _ -> pure (SP n 0) -+ -+ let !signedCoeff | positive = c -+ | otherwise = -c -+ -+ let littleE = 101 -+ bigE = 69 -+ (I.satisfy (\ex -> ex == littleE || ex == bigE) *> -+ fmap (h . Sci.scientific signedCoeff . (e +)) (signed decimal)) <|> -+ return (h $ Sci.scientific signedCoeff e) diff --git a/converters/hs-aeson/files/patch-aeson.cabal b/converters/hs-aeson/files/patch-aeson.cabal deleted file mode 100644 index 0d2683706ccb..000000000000 --- a/converters/hs-aeson/files/patch-aeson.cabal +++ /dev/null @@ -1,11 +0,0 @@ ---- ./aeson.cabal.orig 2014-05-16 17:43:52.000000000 +0200 -+++ ./aeson.cabal 2014-07-12 19:15:00.000000000 +0200 -@@ -112,7 +112,7 @@ - Data.Aeson.Types.Generic - - build-depends: -- attoparsec >= 0.11.3.4, -+ attoparsec >= 0.10.4.0, - base == 4.*, - containers, - deepseq, |