packages feed

microformats2-parser-1.0.2.2: microformats2-parser.cabal

name:            microformats2-parser
version:         1.0.2.2
synopsis:        A Microformats 2 parser.
description:     A parser for Microformats 2 (http://microformats.org/wiki/microformats2), a simple way to describe structured information in HTML.
category:        Web
homepage:        https://codeberg.org/valpackett/microformats2-parser
bug-reports:     https://codeberg.org/valpackett/microformats2-parser/issues
author:          Val Packett
copyright:       2015-2022 Val Packett <val@packett.cool>
maintainer:      val@packett.cool
license:         PublicDomain
license-file:    UNLICENSE
build-type:      Simple
cabal-version:   >= 1.10
extra-source-files:
    README.md
tested-with:
    GHC == 9.0.2

source-repository head
    type: git
    location: https://codeberg.org/valpackett/microformats2-parser.git

library
    build-depends:
        base >= 4.7.0.0 && < 5
      , base-compat >= 0.8.0
      , transformers
      , text
      , bytestring
      , case-insensitive
      , time
      , either
      , safe
      , errors
      , containers
      , unordered-containers
      , vector
      , aeson
      , aeson-qq
      , lens
      , lens-aeson
      , data-default
      , html-conduit
      , xml-lens
      , tagsoup
      , network-uri
      , blaze-markup
      , xss-sanitize
      , pcre-heavy
      , attoparsec
    default-language: Haskell2010
    exposed-modules:
        Data.Microformats2.Parser
        Data.Microformats2.Parser.Property
        Data.Microformats2.Parser.Date
        Data.Microformats2.Parser.HtmlUtil
        Data.Microformats2.Parser.Util
        Data.Microformats2.Jf2
    other-modules:
        Data.Microformats2.Parser.UnsafeUtil
    ghc-options: -Wall
    hs-source-dirs: library

flag serverbin
    description: Build demo/API HTTP server binary
    default: False

executable microformats2-parser
    if flag(serverbin)
        build-depends:
            base >= 4.7.0.0 && < 5
          , base-compat >= 0.8.0
          , options
          , wai
          , wai-cli
          , wai-extra
          , network
          , network-uri
          , data-default
          , text
          , scotty
          , aeson
          , aeson-pretty
          , blaze-html
          , blaze-markup
          , githash
          , microformats2-parser
    else
        buildable: False
    default-language: Haskell2010
    ghc-options: -Wall -threaded -rtsopts "-with-rtsopts=-N -qa -qm"
    hs-source-dirs: executable
    main-is: Server.hs
    other-modules: WebApp

flag serverlambda
    description: Build demo/API AWS Lambda handler binary
    default: False

executable microformats2-parser-lambda
    if flag(serverlambda)
        build-depends:
                base >= 4.7.0.0 && < 5
              , base-compat >= 0.8.0
              , options
              , aws-lambda-haskell-runtime
              , aws-lambda-haskell-runtime-wai
              , wai
              , wai-extra
              , network
              , network-uri
              , data-default
              , text
              , scotty
              , aeson
              , aeson-pretty
              , blaze-html
              , blaze-markup
              , githash
              , microformats2-parser
    else
        buildable: False
    default-language: Haskell2010
    ghc-options: -Wall -threaded -rtsopts "-with-rtsopts=-N -qa -qm"
    hs-source-dirs: executable
    main-is: Lambda.hs
    other-modules: WebApp

test-suite tests
    build-depends:
        base >= 4.7.0.0 && < 5
      , base-compat >= 0.8.0
      , mtl
      , time
      , text
      , bytestring
      , network-uri
      , hspec
      , hspec-expectations-pretty-diff
      , template-haskell
      , microformats2-parser
      , raw-strings-qq
      , aeson-qq
      , data-default
      , html-conduit
      , xml-lens
    default-language: Haskell2010
    ghc-options: -threaded -Wall
    hs-source-dirs: test-suite
    main-is: Spec.hs
    other-modules:
        TestCommon
        Data.Microformats2.ParserSpec
        Data.Microformats2.Parser.PropertySpec
        Data.Microformats2.Parser.HtmlUtilSpec
        Data.Microformats2.Jf2Spec
    type: exitcode-stdio-1.0