name:                wai-predicates
version:             0.3
synopsis:            WAI request predicates
license:             OtherLicense
license-file:        LICENSE
author:              Toralf Wittner
maintainer:          Toralf Wittner <tw@dtex.org>
copyright:           (c) 2014 Toralf Wittner
stability:           experimental
category:            Web
build-type:          Simple
cabal-version:       >= 1.10

extra-source-files:
    README.md
    CHANGELOG.md

description:
    Evaluate predicate functions against WAI requests and receive
    metadata in addition to a success/failure indicator.
    Predicates can be combined using logical connectives and the
    metadata are passed on accordingly.

source-repository head
    type:             git
    location:         git://github.com/twittner/wai-predicates.git

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

    exposed-modules:
        Data.Predicate
        Network.Wai.Predicate
        Network.Wai.Predicate.Error
        Network.Wai.Predicate.MediaType
        Network.Wai.Predicate.Request
        Network.Wai.Predicate.Utility

    other-modules:
        Data.Predicate.Product
        Data.Predicate.Result
        Network.Wai.Predicate.Accept
        Network.Wai.Predicate.Content
        Network.Wai.Predicate.Parser.MediaType

    build-depends:
        attoparsec       >= 0.10  && < 0.12
      , base             == 4.*
      , bytestring       >= 0.9   && < 0.11
      , bytestring-from  == 0.2.*
      , cookie           == 0.4.*
      , case-insensitive == 1.1.*
      , http-types       == 0.8.*
      , transformers     == 0.3.*
      , vector           == 0.10.*
      , wai              >= 2.0 && < 2.2

test-suite wai-predicate-tests
    type:             exitcode-stdio-1.0
    default-language: Haskell2010
    hs-source-dirs:   test
    main-is:          TestSuite.hs
    ghc-options:      -Wall -O2 -fwarn-tabs
    ghc-prof-options: -prof -auto-all

    other-modules:
        Tests.Data.Predicate
        Tests.Wai.Predicate
        Tests.Wai.Util

    build-depends:
        base             == 4.*
      , blaze-builder    == 0.3.*
      , bytestring       >= 0.9 && < 0.11
      , case-insensitive == 1.1.*
      , http-types       == 0.8.*
      , HUnit            >= 1.2
      , QuickCheck       >= 2.3
      , tasty            >= 0.3
      , tasty-hunit      >= 0.2
      , tasty-quickcheck >= 0.3
      , wai
      , wai-predicates