packages feed

servant-pagination-2.1.0: servant-pagination.cabal

name:                servant-pagination
synopsis:            Type-safe pagination for Servant APIs
description:         This module offers opinionated helpers to declare a type-safe and a flexible pagination
                     mecanism for Servant APIs. This design, inspired by Heroku's API, provides a small framework
                     to communicate about a possible pagination feature of an endpoint, enabling a client to
                     consume the API in different fashions (pagination with offset / limit, endless scroll using last
                     referenced resources, ascending and descending ordering, etc.)
version:             2.1.0
homepage:            https://github.com/chordify/haskell-servant-pagination
bug-reports:         https://github.com/chordify/haskell-servant-pagination/issues
license:             LGPL-3
license-file:        LICENSE
author:              Chordify
maintainer:          Chordify <haskelldevelopers@chordify.net>, Matthias Benkort <matthias.benkort@gmail.com>
copyright:           (c) 2018 Chordify
category:            Web
build-type:          Simple
cabal-version:       >=1.20
extra-source-files:  README.md
                     CHANGELOG.md
                     stack.yaml
                     Setup.hs
                     .stylish-haskell.yaml

source-repository head
  type: git
  location: git://github.com/chordify/haskell-servant-pagination.git

flag examples
  description: build examples executables
  default: False
  manual: True

library
  hs-source-dirs:      src
  default-language:    Haskell2010
  ghc-options:         -Wall -j4
  default-extensions:  BangPatterns
                     , ConstraintKinds
                     , DataKinds
                     , DefaultSignatures
                     , DeriveDataTypeable
                     , DeriveFunctor
                     , DeriveGeneric
                     , ExistentialQuantification
                     , FlexibleContexts
                     , FlexibleInstances
                     , GADTs
                     , KindSignatures
                     , MultiParamTypeClasses
                     , OverloadedStrings
                     , ParallelListComp
                     , RecordWildCards
                     , ScopedTypeVariables
                     , TupleSections
                     , TypeApplications
                     , TypeFamilies
                     , TypeOperators

  build-depends:       base >= 4 && < 5
                     , text >= 1.2 && < 2
                     , servant >= 0.11 && <= 0.13
                     , servant-server >= 0.11 && <= 0.13
                     , safe >= 0.3 && < 1

  exposed-modules:     Servant.Pagination


executable servant-pagination-simple
  if !flag(examples)
    buildable: False
  hs-source-dirs:      examples
  default-language:    Haskell2010
  main-is:             Simple.hs
  ghc-options:         -Wall -j4 -threaded -rtsopts -with-rtsopts=-N

  default-extensions:  BangPatterns
                     , ConstraintKinds
                     , DataKinds
                     , DefaultSignatures
                     , DeriveDataTypeable
                     , DeriveFunctor
                     , DeriveGeneric
                     , ExistentialQuantification
                     , FlexibleContexts
                     , FlexibleInstances
                     , GADTs
                     , KindSignatures
                     , MultiParamTypeClasses
                     , OverloadedStrings
                     , ParallelListComp
                     , RecordWildCards
                     , ScopedTypeVariables
                     , TupleSections
                     , TypeApplications
                     , TypeFamilies
                     , TypeOperators

  build-depends:       base >= 4 && < 5
                     , aeson >= 1.2 && < 2
                     , servant >= 0.11 && <= 0.13
                     , servant-pagination
                     , servant-server >= 0.11 && <= 0.13
                     , warp >= 3.2 && < 4

  other-modules:       Color


executable servant-pagination-complex
  if !flag(examples)
    buildable: False
  hs-source-dirs:      examples
  default-language:    Haskell2010
  main-is:             Complex.hs
  ghc-options:         -Wall -j4 -threaded -rtsopts -with-rtsopts=-N

  default-extensions:  BangPatterns
                     , ConstraintKinds
                     , DataKinds
                     , DefaultSignatures
                     , DeriveDataTypeable
                     , DeriveFunctor
                     , DeriveGeneric
                     , ExistentialQuantification
                     , FlexibleContexts
                     , FlexibleInstances
                     , GADTs
                     , KindSignatures
                     , MultiParamTypeClasses
                     , OverloadedStrings
                     , ParallelListComp
                     , RecordWildCards
                     , ScopedTypeVariables
                     , TupleSections
                     , TypeApplications
                     , TypeFamilies
                     , TypeOperators

  build-depends:       base >= 4 && < 5
                     , aeson >= 1.2 && < 2
                     , servant >= 0.11 && <= 0.13
                     , servant-pagination
                     , servant-server >= 0.11 && <= 0.13
                     , warp >= 3.2 && < 4

  other-modules:       Color


test-suite servant-pagination-test
  hs-source-dirs:      test
  main-is:             Spec.hs
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  ghc-options:         -Wall -j4

  default-extensions:  BangPatterns
                     , ConstraintKinds
                     , DataKinds
                     , DefaultSignatures
                     , DeriveDataTypeable
                     , DeriveFunctor
                     , DeriveGeneric
                     , ExistentialQuantification
                     , FlexibleContexts
                     , FlexibleInstances
                     , GADTs
                     , KindSignatures
                     , MultiParamTypeClasses
                     , OverloadedStrings
                     , ParallelListComp
                     , RecordWildCards
                     , ScopedTypeVariables
                     , TupleSections
                     , TypeApplications
                     , TypeFamilies
                     , TypeOperators


  build-depends:       base
                     , servant-pagination
                     , QuickCheck
                     , hspec
                     , servant-server
                     , text

  other-modules:       Servant.PaginationSpec