git.iko.soy/typeable/bytestring-conversion
on c8a75f3 help sign in
5 files changed+26−107
since splitsnapshots
unifiedsplit
.travis.yml+4−84 CHANGELOG.txt−7 README.md+4−1 bytestring-conversion.cabal+15−13 src/Data/ByteString/Conversion/To.hs+3−2
.travis.yml+4−84
@@ -1,84 +1,4 @@
1−# This file has been generated -- see https://github.com/hvr/multi-ghc-travis
2−language: c
3−sudo: false
4−
5−cache:
6− directories:
7− - $HOME/.cabsnap
8− - $HOME/.cabal/packages
9−
10−before_cache:
11− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
12− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
13−
14−matrix:
15− include:
16− - env: CABALVER=1.18 GHCVER=7.4.2
17− compiler: ": #GHC 7.4.2"
18− addons: {apt: {packages: [cabal-install-1.18,ghc-7.4.2], sources: [hvr-ghc]}}
19− - env: CABALVER=1.18 GHCVER=7.6.3
20− compiler: ": #GHC 7.6.3"
21− addons: {apt: {packages: [cabal-install-1.18,ghc-7.6.3], sources: [hvr-ghc]}}
22− - env: CABALVER=1.18 GHCVER=7.8.4
23− compiler: ": #GHC 7.8.4"
24− addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
25− - env: CABALVER=1.22 GHCVER=7.10.3
26− compiler: ": #GHC 7.10.3"
27− addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
28−
29−before_install:
30− - unset CC
31− - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
32−
33−install:
34− - cabal --version
35− - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
36− - if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
37− then
38− zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
39− $HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
40− fi
41− - travis_retry cabal update -v
42− - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
43− - cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt
44− - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
45−
46−# check whether current requested install-plan matches cached package-db snapshot
47− - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
48− then
49− echo "cabal build-cache HIT";
50− rm -rfv .ghc;
51− cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
52− cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
53− else
54− echo "cabal build-cache MISS";
55− rm -rf $HOME/.cabsnap;
56− mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
57− cabal install --only-dependencies --enable-tests --enable-benchmarks;
58− fi
59−
60−# snapshot package-db on cache miss
61− - if [ ! -d $HOME/.cabsnap ];
62− then
63− echo "snapshotting package-db to build-cache";
64− mkdir $HOME/.cabsnap;
65− cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
66− cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
67− fi
68−
69−# Here starts the actual work to be performed for the package under test;
70−# any command which exits with a non-zero exit code causes the build to fail.
71−script:
72− - if [ -f configure.ac ]; then autoreconf -i; fi
73− - cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
74− - cabal build # this builds all libraries and executables (including tests/benchmarks)
75− - cabal test
76− - cabal sdist # tests that a source-distribution can be generated
77−
78−# Check that the resulting source distribution can be built & installed.
79−# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
80−# `cabal install --force-reinstalls dist/*-*.tar.gz`
81− - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
82− (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
83−
84−# EOF
1+language: haskell
2+ghc:
3+ - 7.8
4+ - 7.6
CHANGELOG.txtdeleted−7
@@ -1,7 +0,0 @@
1−0.3.2
2−------
3−- GHC and `bytestring` version compatibility updates.
4−
5−0.3.1
6−------
7−- Use `blaze-textual` on Windows instead of `double-conversion`
README.md+4−1
@@ -1,5 +1,8 @@
11bytestring-conversion
22=====================
33
4−Type-classes to convert values to and from textual `ByteString` encodings.
4+[![Build Status](https://travis-ci.org/twittner/bytestring-conversion.svg?branch=master)][1]
55
6+Type-classes to convert values to and from `ByteString`.
7+
8+[1]: https://travis-ci.org/twittner/bytestring-conversion
bytestring-conversion.cabal+15−13
@@ -1,30 +1,31 @@
11name: bytestring-conversion
2−version: 0.3.2
2+version: 0.3.1
33synopsis: Type-classes to convert values to and from ByteString.
44license: MPL-2.0
55license-file: LICENSE
66author: Toralf Wittner
77maintainer: Toralf Wittner <tw@dtex.org>
88copyright: (C) 2014-2015 Toralf Wittner
9−homepage: https://gitlab.com/twittner/bytestring-conversion
10−bug-reports: https://gitlab.com/twittner/bytestring-conversion/issues
9+homepage: https://github.com/twittner/bytestring-conversion/
10+bug-reports: https://github.com/twittner/bytestring-conversion/issues
11+stability: experimental
1112category: Data
1213build-type: Simple
1314cabal-version: >= 1.10
14−extra-source-files: README.md, CHANGELOG.txt
15+extra-source-files: README.md
1516
1617description:
1718 Defines the type-classes 'ToByteString' and 'FromByteString'
18− to convert values to and from textual 'ByteString' encodings.
19+ to convert values to and from ByteString.
1920
2021source-repository head
21− type: git
22− location: git@gitlab.com:twittner/bytestring-conversion.git
22+ type: git
23+ location: git://github.com/twittner/bytestring-conversion.git
2324
2425library
2526 default-language: Haskell2010
2627 hs-source-dirs: src
27− ghc-options: -Wall -O2 -fwarn-tabs
28+ ghc-options: -Wall -O2 -fwarn-tabs -funbox-strict-fields
2829
2930 exposed-modules:
3031 Data.ByteString.Conversion
@@ -35,11 +36,11 @@ library
3536 Data.ByteString.Conversion.Internal
3637
3738 build-depends:
38− base >= 4.5 && < 5.0
39− , attoparsec >= 0.10 && < 1.0
40− , bytestring >= 0.10.2 && < 1.0
41− , case-insensitive >= 1.2 && < 2.0
42− , text >= 0.11 && < 3.0
39+ base >= 4.5 && < 5.0
40+ , attoparsec >= 0.10 && < 1.0
41+ , bytestring >= 0.10.4 && < 1.0
42+ , case-insensitive >= 1.2 && < 2.0
43+ , text >= 0.11 && < 2.0
4344
4445 if os(windows)
4546 cpp-options: -DWINDOWS
@@ -53,6 +54,7 @@ test-suite bytestring-conversion-tests
5354 hs-source-dirs: test
5455 main-is: Tests.hs
5556 ghc-options: -Wall -O2 -fwarn-tabs
57+ ghc-prof-options: -prof -auto-all
5658
5759 other-modules:
5860 Properties
src/Data/ByteString/Conversion/To.hs+3−2
@@ -16,11 +16,12 @@ module Data.ByteString.Conversion.To
1616
1717import Data.ByteString (ByteString)
1818import Data.ByteString.Conversion.Internal
19−import Data.ByteString.Builder
20−import Data.ByteString.Builder.Extra hiding (runBuilder)
19+import Data.ByteString.Lazy.Builder
20+import Data.ByteString.Lazy.Builder.Extras hiding (runBuilder)
2121import Data.CaseInsensitive (CI, original)
2222import Data.Int
2323import Data.List (intersperse)
24+import Data.Monoid
2425import Data.Text (Text)
2526import Data.Text.Encoding (encodeUtf8)
2627import Data.Word