cabal-version:       2.4

name:                hexstream
version:             0.1.0.0
synopsis:            Streaming-friendly XML parsers
description:         Cf README file
homepage:            https://github.com/k0ral/hexstream
bug-reports:         https://github.com/k0ral/hexstream/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/hexstream.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, hexstream

test-suite golden
  import: common
  type: exitcode-stdio-1.0
  main-is: golden.hs
  build-depends:
    hexstream,
    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:
    hexstream,
    attoparsec,
    filepath,
    parsers,
    resourcet,
    streaming-attoparsec,
    streaming-bytestring,
    tasty,
    tasty-hunit,
    text
  hs-source-dirs: test

