cabal-version:       2.4

name:                hextream
version:             0.1.0.0
synopsis:            Streaming-friendly XML parsers
description:         Cf README file
homepage:            https://github.com/k0ral/hextream
bug-reports:         https://github.com/k0ral/hextream/issues
license:             CC0-1.0
license-file:        LICENSE
author:              koral
maintainer:          mail@cmoreau.info
category:            Parsing, XML
build-type:          Custom
extra-source-files:  test/*.xml, test/*.golden
tested-with:         GHC <8.10 && >=8.6

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

common common
  build-depends: base >=4.12 && <5, base-compat
  default-language: Haskell2010

custom-setup
  setup-depends: base >=4.12 && <5, Cabal >=2.4, cabal-doctest

library
  import: common
  exposed-modules:
    Data.XML.Parser.Low
    Data.XML.Parser.Low.Entity
    Data.XML.Parser.Low.Name
    Data.XML.Parser.Mid
    Data.XML.Parser.Mid.Attribute
    Data.XML.Parser.Mid.Doctype
    Data.XML.Parser.High
    Data.XML.Parser.High.AttrParser
    Data.XML.Parser.High.NameParser
  build-depends:       containers, parsers, text
  hs-source-dirs:      src

test-suite doctest
  import: common
  type: exitcode-stdio-1.0
  main-is: doc.hs
  hs-source-dirs: test
  build-depends: attoparsec, doctest >= 0.8, hextream

test-suite golden
  import: common
  type: exitcode-stdio-1.0
  main-is: golden.hs
  build-depends:
    hextream,
    attoparsec,
    data-default,
    filepath,
    pretty-simple,
    resourcet,
    streaming-attoparsec,
    streaming-bytestring,
    tasty,
    tasty-golden,
    text
  hs-source-dirs: test

test-suite unit
  import: common
  type: exitcode-stdio-1.0
  main-is: unit.hs
  build-depends:
    hextream,
    attoparsec,
    filepath,
    parsers,
    resourcet,
    streaming-attoparsec,
    streaming-bytestring,
    tasty,
    tasty-hunit,
    text
  hs-source-dirs: test