cabal-version: 2.2
name: atom-conduit
version: 0.9.0.0
build-type: Simple
license: CC0-1.0
license-file: LICENSE
author: koral
maintainer: mail@cmoreau.info
bug-reports: https://github.com/k0ral/atom-conduit/issues
synopsis: Streaming parser/renderer for the Atom 1.0 standard (RFC 4287).
description: Cf README.
category: XML, Conduit
tested-with: GHC <8.12 && >=8.4.2
extra-source-files:
    README.md

source-repository head
    type: git
    location: git://github.com/k0ral/atom-conduit.git

flag enable-hlint-test
  description: Enable hlint test-suite
  manual: True
  default: False

common common
    build-depends:
        base-noprelude >=4.7 && <5,
        relude
    default-language: Haskell2010
    other-modules:
        Prelude


library
    import: common
    exposed-modules:
        Text.Atom.Conduit.Parse
        Text.Atom.Conduit.Render
        Text.Atom.Lens
        Text.Atom.Types
    build-depends:
        blaze-builder,
        conduit >=1.3,
        microlens,
        microlens-th,
        parsers,
        prettyprinter,
        refined >=0.5,
        safe-exceptions,
        text,
        time >=1.5,
        timerep >=2.0,
        uri-bytestring >=0.2,
        xml-conduit >=1.9,
        xml-types
    hs-source-dirs: src

test-suite quickcheck
    import: common
    type: exitcode-stdio-1.0
    main-is: QuickCheck.hs
    build-depends:
        atom-conduit,
        conduit >=1.3,
        generic-random,
        QuickCheck,
        quickcheck-instances,
        refined >=0.5,
        tasty,
        tasty-quickcheck,
        time >=1.5,
        text,
        uri-bytestring >=0.2,
        xml-conduit >=1.9,
        xml-types
    hs-source-dirs: test

test-suite golden
    import: common
    type: exitcode-stdio-1.0
    main-is: GoldenTests.hs
    build-depends:
        atom-conduit,
        conduit >=1.3,
        data-default,
        filepath,
        pretty-simple,
        resourcet,
        tasty,
        tasty-golden,
        text,
        xml-conduit >=1.9
    hs-source-dirs: test

test-suite unit
    import: common
    type: exitcode-stdio-1.0
    main-is: UnitTests.hs
    build-depends:
        atom-conduit,
        conduit >=1.3,
        data-default,
        microlens,
        refined >=0.5,
        resourcet,
        tasty,
        tasty-hunit,
        time >=1.5,
        uri-bytestring >=0.2,
        xml-conduit >=1.9,
        xml-types
    hs-source-dirs: test

test-suite hlint
    import: common
    if flag(enable-hlint-test)
      buildable: True
    else
      buildable: False
    type: exitcode-stdio-1.0
    main-is: HLint.hs
    build-depends: hlint
    hs-source-dirs: test