packages feed

api-tools-0.8.0.2: api-tools.cabal

Name:                api-tools
Version:             0.8.0.2
Synopsis:            DSL for generating API boilerplate and docs
Description:         api-tools provides a compact DSL for describing an API.
                     It uses Template Haskell to generate the
                     corresponding data types and assorted tools for
                     working with it, including Aeson and QuickCheck
                     instances for converting between JSON and the
                     generated types and writing unit tests.
Homepage:            http://github.com/iconnect/api-tools
License:             BSD3
License-file:        LICENSE
Author:              Chris Dornan <chrisd@irisconnect.co.uk> and Adam Gundry <adam@well-typed.com>
Maintainer:          Chris Dornan <chrisd@irisconnect.co.uk> and Adam Gundry <adam@well-typed.com>
Copyright:           (c) Iris Connect 2013-2018
Category:            Network, Web, Cloud, Distributed Computing
Build-type:          Simple
Extra-source-files:  changelog
Cabal-version:       >=1.10
Tested-with:         GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.2

Source-Repository head
  Type:              git
  Location:          git://github.com/iconnect/api-tools.git

Source-Repository this
  Type:              git
  Location:          git://github.com/iconnect/api-tools.git
  Tag:               0.8.0.2

flag time15
  default: True

Library
  Hs-Source-Dirs:    src

  Exposed-modules:
        Data.API.API
        Data.API.API.DSL
        Data.API.API.Gen
        Data.API.Changes
        Data.API.Changes.Types
        Data.API.Doc
        Data.API.Doc.Subst
        Data.API.Error
        Data.API.JSON
        Data.API.JSONToCBOR
        Data.API.Markdown
        Data.API.NormalForm
        Data.API.Parse
        Data.API.PP
        Data.API.TH
        Data.API.Tools
        Data.API.Tools.CBOR
        Data.API.Tools.Combinators
        Data.API.Tools.Datatypes
        Data.API.Tools.DeepSeq
        Data.API.Tools.Enum
        Data.API.Tools.Example
        Data.API.Tools.JSON
        Data.API.Tools.JSONTests
        Data.API.Tools.Lens
        Data.API.Tools.QuickCheck
        Data.API.Tools.SafeCopy
        Data.API.Tools.Traversal
        Data.API.Tutorial
        Data.API.Types
        Data.API.Utils
        Data.API.Value
        Data.Binary.Serialise.CBOR.Extra
        Data.Binary.Serialise.CBOR.JSON

  Other-modules:
        Data.API.Doc.Call
        Data.API.Doc.Dir
        Data.API.Doc.Types
        Data.API.Scan
        Data.API.TH.Compat

  Build-depends:
        Cabal                >= 1.4      && < 2.5  ,
        QuickCheck           >= 2.5.1    && < 2.13 ,
        aeson                >= 0.10     && < 1.5  ,
        aeson-pretty         >= 0.1      && < 0.9  ,
        array                >= 0.4      && < 0.6  ,
        attoparsec           >= 0.10.4   && < 0.14 ,
        base                 >= 4        && < 5    ,
        base16-bytestring    >= 0.1      && < 0.2  ,
        base64-bytestring    >= 1.0      && < 1.1  ,
        bytestring           >= 0.9      && < 0.11 ,
        case-insensitive     >= 1.0      && < 1.3  ,
        cborg                >= 0.1.1.0  && < 0.3  ,
        containers           >= 0.5      && < 0.7  ,
        deepseq              >= 1.1      && < 1.5  ,
        lens                 >= 3.8.7    && < 4.18 ,
        regex-compat-tdfa    >= 0.95.1   && < 0.96 ,
        safe                 >= 0.3.3    && < 0.4  ,
        safecopy             >= 0.8.1    && < 0.10 ,
        scientific           >= 0.3      && < 0.4  ,
        serialise            >= 0.1.0.0  && < 0.3  ,
        template-haskell     >= 2.7      && < 2.15 ,
        text                 >= 0.11.3   && < 1.3  ,
        unordered-containers >= 0.2.3.0  && < 0.3  ,
        vector               >= 0.10.0.1 && < 0.13

  if flag(time15)
    Build-depends:
        time                 >= 1.5.0    && < 1.10
  else
    Build-depends:
        old-locale           >= 1        && < 1.1,
        time                 >= 1.1.4    && < 1.5

  if !impl(ghc >= 8.0)
    -- Needed for Data.Semigroup before it was in base
    build-depends: semigroups == 0.18.*

  Build-tools:
        alex,
        happy

  GHC-Options:
        -Wall
        -fwarn-tabs

  Default-Language: Haskell2010


Executable migration-tool
  Hs-Source-Dirs:    main

  Main-is:    Data/API/MigrationTool.hs

  Build-depends:
        api-tools,
        aeson,
        aeson-pretty,
        base,
        bytestring

  GHC-Options:
        -main-is Data.API.MigrationTool
        -Wall
        -fwarn-tabs

  Default-Language: Haskell2010


Executable perf-test
  Hs-Source-Dirs:    main

  Main-is:    Data/API/PerfTest.hs

  Build-depends:
        api-tools,
        QuickCheck,
        aeson,
        base,
        deepseq,
        serialise

  GHC-Options:
        -main-is Data.API.PerfTest
        -Wall
        -fwarn-tabs
        -rtsopts

  Default-Language: Haskell2010


Test-Suite test-api-tools
  Hs-Source-Dirs:    tests

  Type:       exitcode-stdio-1.0

  Main-is:    Data/API/Test/Main.hs

  Other-modules:
        Data.API.Test.DSL
        Data.API.Test.Gen
        Data.API.Test.JSON
        Data.API.Test.Migration
        Data.API.Test.MigrationData

  Build-depends:
        api-tools,
        Cabal,
        QuickCheck,
        aeson,
        aeson-pretty,
        base,
        base64-bytestring,
        bytestring,
        cborg,
        containers,
        safecopy,
        serialise,
        tasty                >= 0.10.1   && < 1.2 ,
        tasty-hunit          >= 0.2      && < 10.0,
        tasty-quickcheck     >= 0.3      && < 0.11,
        time,
        template-haskell,
        text,
        unordered-containers

  GHC-Options:
        -main-is Data.API.Test.Main
        -Wall
        -fwarn-tabs

  Default-Language: Haskell2010