name:                 cql
version:              4.0.2
synopsis:             Cassandra CQL binary protocol.
stability:            experimental
license:              OtherLicense
license-file:         LICENSE
author:               Toralf Wittner, Roman S. Borschel
maintainer:           Toralf Wittner <tw@dtex.org>,
                      Roman S. Borschel <roman@pkaboo.org>
copyright:            (C) 2014-2015 Toralf Wittner, Roman S. Borschel
homepage:             https://gitlab.com/twittner/cql/
bug-reports:          https://gitlab.com/twittner/cql/issues
category:             Database
build-type:           Simple
cabal-version:        >= 1.10
extra-source-files:   README.md
                      CHANGELOG
                      CONTRIBUTING
                      AUTHORS

description:
    Implementation of Cassandra's CQL Binary Protocol
    <https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v3.spec Version 3>
    and
    <https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec Version 4>.
    .
    It provides encoding and decoding functionality as well as representations
    of the various protocol related types.
    .
    Thus it can serve as a building block for writing Cassandra drivers, such
    as <http://hackage.haskell.org/package/cql-io cql-io>.

flag incompatible-varint
    description: Use incompatible legacy encoding for varint and decimal.
    default: False

source-repository head
    type:     git
    location: https://gitlab.com/twittner/cql

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

    exposed-modules:
        Database.CQL.Protocol
        Database.CQL.Protocol.Internal

    other-modules:
        Database.CQL.Protocol.Class
        Database.CQL.Protocol.Codec
        Database.CQL.Protocol.Record
        Database.CQL.Protocol.Tuple
        Database.CQL.Protocol.Tuple.TH
        Database.CQL.Protocol.Types
        Database.CQL.Protocol.Header
        Database.CQL.Protocol.Request
        Database.CQL.Protocol.Response

    if flag(incompatible-varint)
        cpp-options: -DINCOMPATIBLE_VARINT

    build-depends:
          base             >= 4.9    && < 5.0
        , bytestring       >= 0.10
        , cereal           >= 0.3
        , containers       >= 0.5
        , Decimal          >= 0.3
        , iproute          >= 1.3
        , network          >= 2.4
        , text             >= 0.11
        , template-haskell
        , time             >= 1.4
        , transformers     >= 0.3
        , uuid             >= 1.2.6
        , vector           >= 0.10

test-suite cql-tests
    type:             exitcode-stdio-1.0
    default-language: Haskell2010
    main-is:          Main.hs
    hs-source-dirs:   test
    ghc-options:      -threaded -Wall -O2 -fwarn-tabs
    other-modules:    Tests

    build-depends:
          base
        , bytestring
        , cereal
        , cql
        , Decimal
        , iproute
        , network
        , QuickCheck
        , tasty            >= 0.8
        , tasty-quickcheck >= 0.8
        , text
        , time
        , uuid