Skip to content

Commit

Permalink
Merge branch 'master' into sconcat
Browse files Browse the repository at this point in the history
  • Loading branch information
gwils committed Dec 19, 2019
2 parents 4508d01 + 95fe6bd commit ae37017
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 105 deletions.
14 changes: 11 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ env:
- GHCVER=7.10.3 CABALVER=1.22
- GHCVER=8.0.2 CABALVER=1.24
- GHCVER=8.2.2 CABALVER=2.0
- GHCVER=head CABALVER=2.0
- GHCVER=8.4.4 CABALVER=2.2
- GHCVER=8.6.3 CABALVER=2.4
- GHCVER=8.8.1 CABALVER=2.4
- GHCVER=head CABALVER=2.4

matrix:
allow_failures:
- env: GHCVER=head CABALVER=2.0
- env: GHCVER=head CABALVER=2.4

before_install:
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
Expand All @@ -25,7 +28,12 @@ before_install:
install:
- travis_retry cabal update
# can't use "cabal install --only-dependencies --enable-tests" due to dep-cycle
- cabal install "QuickCheck >=2.4 && <2.10" "byteorder ==1.0.*" "dlist >=0.5 && <0.8" "mtl >=2.0 && <2.3" deepseq test-framework-hunit test-framework-quickcheck2
- cabal install
"QuickCheck >=2.10 && <2.14"
"byteorder ==1.0.*"
"dlist >=0.5 && <0.9"
"mtl >=2.0 && <2.3"
deepseq test-framework-hunit test-framework-quickcheck2

script:
- cabal configure --enable-tests -v2
Expand Down
10 changes: 8 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
0.10.10.0 TBD
0.10.10.1 TBD

* Add conversions between ShortByteString and CString (#126)
* Improve the performance of `sconcat` for lazy and strict bytestrings

0.10.10.0 July 2019 <duncan+haskell@dcoutts.me.uk> July 2019

* Build with GHC 8.8, and tests with QC 2.10+
* Add conversions between ShortByteString and CString (#126)
* Documentation fixes (#65, #118, #144, #150, #152, #172)
* Resolve potential copyright issue with test data (#165)

0.10.8.2 Duncan Coutts <duncan@community.haskell.org> Feb 2017

* Make readFile work for files with no size like /dev/null
Expand Down
2 changes: 1 addition & 1 deletion Data/ByteString/Builder/Prim/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ eitherB (BP b1 io1) (BP b2 io2) =
-- Unicode codepoints above 127 as follows.
--
-- @
--charASCIIDrop = 'condB' (< '\128') ('fromF' 'char7') 'emptyB'
--charASCIIDrop = 'condB' (< \'\\128\') ('fromF' 'char7') 'emptyB'
-- @
{-# INLINE CONLIKE condB #-}
condB :: (a -> Bool) -> BoundedPrim a -> BoundedPrim a -> BoundedPrim a
Expand Down
10 changes: 5 additions & 5 deletions Data/ByteString/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -221,22 +221,22 @@ unsafePackLenChars len cs0 =
-- | /O(n)/ Pack a null-terminated sequence of bytes, pointed to by an
-- Addr\# (an arbitrary machine address assumed to point outside the
-- garbage-collected heap) into a @ByteString@. A much faster way to
-- create an Addr\# is with an unboxed string literal, than to pack a
-- create an 'Addr#' is with an unboxed string literal, than to pack a
-- boxed string. A unboxed string literal is compiled to a static @char
-- []@ by GHC. Establishing the length of the string requires a call to
-- @strlen(3)@, so the Addr# must point to a null-terminated buffer (as
-- is the case with "string"# literals in GHC). Use 'unsafePackAddressLen'
-- @strlen(3)@, so the 'Addr#' must point to a null-terminated buffer (as
-- is the case with @\"string\"\#@ literals in GHC). Use 'unsafePackAddressLen'
-- if you know the length of the string statically.
--
-- An example:
--
-- > literalFS = unsafePackAddress "literal"#
--
-- This function is /unsafe/. If you modify the buffer pointed to by the
-- original Addr# this modification will be reflected in the resulting
-- original 'Addr#' this modification will be reflected in the resulting
-- @ByteString@, breaking referential transparency.
--
-- Note this also won't work if your Addr# has embedded '\0' characters in
-- Note this also won't work if your 'Addr#' has embedded @\'\\0\'@ characters in
-- the string, as @strlen@ will return too short a length.
--
unsafePackAddress :: Addr# -> IO ByteString
Expand Down
3 changes: 3 additions & 0 deletions bench/bench-bytestring.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ executable bench-bytestring-builder
, deepseq >= 1.2
, criterion >= 0.5
, blaze-textual == 0.2.*
-- There is no point using blaze-builder-0.4+ as that
-- version is just a wrapper around bytestring itself,
-- abd so a comparison benchmark would have no purpose.
, blaze-builder == 0.3.*
-- we require bytestring due to benchmarking against
-- blaze-textual, which uses blaze-builder
Expand Down
6 changes: 3 additions & 3 deletions bytestring.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: bytestring
Version: 0.10.9.0
Version: 0.10.10.0
Synopsis: Fast, compact, strict and lazy byte strings with a list interface
Description:
An efficient compact, immutable byte string type (both strict and lazy)
Expand Down Expand Up @@ -153,7 +153,7 @@ test-suite prop-compiled
hs-source-dirs: . tests
build-depends: base, ghc-prim, deepseq, random, directory,
test-framework, test-framework-quickcheck2,
QuickCheck >= 2.3 && < 2.10
QuickCheck >= 2.10 && < 2.14
c-sources: cbits/fpstring.c
include-dirs: include
ghc-options: -fwarn-unused-binds
Expand Down Expand Up @@ -198,7 +198,7 @@ test-suite test-builder

build-depends: base, ghc-prim,
deepseq,
QuickCheck >= 2.4 && < 2.10,
QuickCheck >= 2.10 && < 2.14,
byteorder == 1.0.*,
dlist >= 0.5 && < 0.9,
directory,
Expand Down
Loading

0 comments on commit ae37017

Please sign in to comment.