packages feed

bytestring-builder 0.10.4.1.2 → 0.10.6.0.0

raw patch · 10 files changed

+44/−10 lines, 10 files

Files

bytestring-builder.cabal view
@@ -1,5 +1,5 @@ name:                bytestring-builder-version:             0.10.4.1.2+version:             0.10.6.0.0 synopsis:            The new bytestring builder, packaged outside of GHC description:   This is the bytestring builder that is debuting in bytestring-0.10.4.0, which@@ -51,7 +51,7 @@ source-repository this   type:     git   location: http://github.com/lpsmith/bytestring-builder-  tag:      v0.10.4.1.2+  tag:      v0.10.6.0.0  Flag bytestring_has_builder   default: True
src/Data/ByteString/Builder.hs view
@@ -266,7 +266,9 @@  -- HADDOCK only imports import qualified Data.ByteString               as S (concat)-import           Data.Monoid+#if !(MIN_VERSION_base(4,8,0))+import           Data.Monoid (Monoid(..))+#endif import           Data.Foldable                      (foldMap) import           Data.List                          (intersperse) 
src/Data/ByteString/Builder/ASCII.hs view
@@ -86,14 +86,19 @@   #if defined(__GLASGOW_HASKELL__) && defined(INTEGER_GMP)++#if !(MIN_VERSION_base(4,8,0)) import           Data.Monoid (mappend)+# endif import           Foreign.C.Types  import qualified Data.ByteString.Builder.Prim.Internal          as P import           Data.ByteString.Builder.Prim.Internal.UncheckedShifts                    ( caseWordSize_32_64 ) +# if __GLASGOW_HASKELL__ < 710 import           GHC.Num     (quotRemInteger)+# endif import           GHC.Types   (Int(..))  
src/Data/ByteString/Builder/Internal.hs view
@@ -129,10 +129,13 @@ ) where  import           Control.Arrow (second)-import           Control.Applicative (Applicative(..), (<$>))--- import           Control.Exception (return) +#if !(MIN_VERSION_base(4,8,0)) import           Data.Monoid+import           Control.Applicative (Applicative(..))+#endif+import           Control.Applicative ((<$>))+ import qualified Data.ByteString               as S import qualified Data.ByteString.Internal      as S import qualified Data.ByteString.Lazy.Internal as L@@ -385,7 +388,11 @@ -- only exported for use in rewriting rules. Use 'mempty' otherwise. {-# INLINE[1] empty #-} empty :: Builder-empty = Builder id+empty = Builder (\cont -> (\range -> cont range))+-- This eta expansion (hopefully) allows GHC to worker-wrapper the+-- 'BufferRange' in the 'empty' base case of loops (since+-- worker-wrapper requires (TODO: verify this) that all paths match+-- against the wrapped argument.  -- | Concatenate two 'Builder's. This function is only exported for use in rewriting -- rules. Use 'mappend' otherwise.
src/Data/ByteString/Builder/Prim/ASCII.hs view
@@ -1,4 +1,8 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables, ForeignFunctionInterface #-}+#if __GLASGOW_HASKELL__ >= 701+{-# LANGUAGE Trustworthy #-}+#endif -- | Copyright   : (c) 2010 Jasper Van der Jeugt --                 (c) 2010 - 2011 Simon Meier -- License       : BSD3-style (see LICENSE)
src/Data/ByteString/Builder/Prim/Binary.hs view
@@ -1,4 +1,7 @@ {-# LANGUAGE CPP, BangPatterns #-}+#if __GLASGOW_HASKELL__ >= 701+{-# LANGUAGE Trustworthy #-}+#endif -- | Copyright   : (c) 2010-2011 Simon Meier -- License       : BSD3-style (see LICENSE) --
src/Data/ByteString/Builder/Prim/Internal/Base16.hs view
@@ -1,4 +1,7 @@ {-# LANGUAGE CPP #-}+#if __GLASGOW_HASKELL__ >= 701+{-# LANGUAGE Trustworthy #-}+#endif -- | -- Copyright   : (c) 2011 Simon Meier -- License     : BSD3-style (see LICENSE)
src/Data/ByteString/Builder/Prim/Internal/Floating.hs view
@@ -1,4 +1,8 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-}+#if __GLASGOW_HASKELL__ >= 701+{-# LANGUAGE Trustworthy #-}+#endif -- | -- Copyright   : (c) 2010 Simon Meier --
src/Data/ByteString/Builder/Prim/Internal/UncheckedShifts.hs view
@@ -1,4 +1,7 @@ {-# LANGUAGE CPP, MagicHash #-}+#if __GLASGOW_HASKELL__ >= 703+{-# LANGUAGE Unsafe #-}+#endif -- | -- Copyright   : (c) 2010 Simon Meier --
src/Data/ByteString/Short/Internal.hs view
@@ -108,7 +108,7 @@ -- data ShortByteString = SBS ByteArray# #if !(MIN_VERSION_base(4,3,0))-                           Int  -- ^ Prior to ghc-7.0.x, 'ByteArray#'s reported+           {-# UNPACK #-} !Int  -- ^ Prior to ghc-7.0.x, 'ByteArray#'s reported                                 -- their length rounded up to the nearest word.                                 -- This means we have to store the true length                                 -- separately, wasting a word.@@ -136,7 +136,8 @@     mappend = append     mconcat = concat -instance NFData ShortByteString where rnf !_ = ()+instance NFData ShortByteString where+    rnf (SBS {}) = ()  instance Show ShortByteString where     showsPrec p ps r = showsPrec p (unpackChars ps) r@@ -364,14 +365,16 @@     let !len1 = length sbs1         !len2 = length sbs2      in len1 == len2-     && 0 == inlinePerformIO (memcmp_ByteArray (asBA sbs1) (asBA sbs2) len1)+     && 0 == inlinePerformIO+               (memcmp_ByteArray (asBA sbs1) (asBA sbs2) len1)  compareBytes :: ShortByteString -> ShortByteString -> Ordering compareBytes sbs1 sbs2 =     let !len1 = length sbs1         !len2 = length sbs2         !len  = min len1 len2-     in case inlinePerformIO (memcmp_ByteArray (asBA sbs1) (asBA sbs2) len) of+     in case inlinePerformIO+               (memcmp_ByteArray (asBA sbs1) (asBA sbs2) len) of           i | i    < 0    -> LT             | i    > 0    -> GT             | len2 > len1 -> LT