packages feed

servant-pagination-2.2.1: 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.2.1
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
  default-language:
    Haskell2010
  ghc-options:
    -Wall
  default-extensions:
      BangPatterns
    , ConstraintKinds
    , DataKinds
    , DefaultSignatures
    , DeriveDataTypeable
    , DeriveFunctor
    , DeriveGeneric
    , ExistentialQuantification
    , FlexibleContexts
    , FlexibleInstances
    , GADTs
    , KindSignatures
    , MultiParamTypeClasses
    , OverloadedStrings
    , ParallelListComp
    , RecordWildCards
    , ScopedTypeVariables
    , TupleSections
    , TypeApplications
    , TypeFamilies
    , TypeOperators
    , UndecidableInstances

  build-depends:
      base >= 4 && < 5
    , text >= 1.2 && < 2
    , servant >= 0.11 && < 0.17
    , servant-server >= 0.11 && < 0.17
    , safe >= 0.3 && < 1
    , uri-encode >= 1.5 && < 1.6

  hs-source-dirs:
    src
  exposed-modules:
    Servant.Pagination


executable servant-pagination-simple
  if !flag(examples)
    buildable: False

  default-language:
      Haskell2010
  ghc-options:
      -Wall
      -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.16
    , servant-pagination
    , servant-server >= 0.11 && < 0.16
    , warp >= 3.2 && < 4

  hs-source-dirs:
      examples
  main-is:
      Simple.hs
  other-modules:
      Color


executable servant-pagination-complex
  if !flag(examples)
    buildable: False

  default-language:
      Haskell2010
  ghc-options:
      -Wall
      -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.15
    , servant-pagination
    , servant-server >= 0.11 && < 0.15
    , warp >= 3.2 && < 4

  hs-source-dirs:
      examples
  main-is:
      Complex.hs
  other-modules:
      Color


test-suite servant-pagination-test
  type:
      exitcode-stdio-1.0
  default-language:
      Haskell2010
  ghc-options:
      -Wall
  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
    , hspec
    , QuickCheck
    , servant-pagination
    , servant-server
    , text

  hs-source-dirs:
      test
  main-is:
      Spec.hs
  other-modules:
      Servant.PaginationSpec