name:                bytestring-conversion
version:             0.3.1
synopsis:            Type-classes to convert values to and from ByteString.
license:             MPL-2.0
license-file:        LICENSE
author:              Toralf Wittner
maintainer:          Toralf Wittner <tw@dtex.org>
copyright:           (C) 2014-2015 Toralf Wittner
homepage:            https://github.com/twittner/bytestring-conversion/
bug-reports:         https://github.com/twittner/bytestring-conversion/issues
stability:           experimental
category:            Data
build-type:          Simple
cabal-version:       >= 1.10
extra-source-files:  README.md, CHANGELOG.txt

description:
    Defines the type-classes 'ToByteString' and 'FromByteString'
    to convert values to and from ByteString.

source-repository head
    type:             git
    location:         git://github.com/twittner/bytestring-conversion.git

library
    default-language: Haskell2010
    hs-source-dirs:   src
    ghc-options:      -Wall -O2 -fwarn-tabs -funbox-strict-fields

    exposed-modules:
        Data.ByteString.Conversion
        Data.ByteString.Conversion.To
        Data.ByteString.Conversion.From

    other-modules:
        Data.ByteString.Conversion.Internal

    build-depends:
        base              >= 4.5    && < 5.0
      , attoparsec        >= 0.10   && < 1.0
      , bytestring        >= 0.10.4 && < 1.0
      , case-insensitive  >= 1.2    && < 2.0
      , text              >= 0.11   && < 2.0

    if os(windows)
        cpp-options:   -DWINDOWS
        build-depends: blaze-textual >= 0.2 && < 0.3
    else
        build-depends: double-conversion >= 2.0 && < 3.0

test-suite bytestring-conversion-tests
    type:             exitcode-stdio-1.0
    default-language: Haskell2010
    hs-source-dirs:   test
    main-is:          Tests.hs
    ghc-options:      -Wall -O2 -fwarn-tabs

    other-modules:
        Properties

    build-depends:
        base
      , bytestring
      , bytestring-conversion
      , QuickCheck            >= 2.6
      , tasty                 >= 0.8
      , tasty-quickcheck      >= 0.8

benchmark bytestring-conversion-bench
    type:             exitcode-stdio-1.0
    default-language: Haskell2010
    main-is:          Bench.hs
    hs-source-dirs:   bench
    ghc-options:      -Wall -O2 -fwarn-tabs -with-rtsopts=-T
    build-depends:
        base
      , bytestring
      , bytestring-conversion
      , criterion             >= 1.0.0.2 && < 2.0
      , text
      , transformers