packages feed

freckle-ua-parser-0.1.0.3: freckle-ua-parser.cabal

cabal-version:      1.12
name:               freckle-ua-parser
version:            0.1.0.3
license:            BSD3
license-file:       LICENSE
copyright:          2012 Ozgun Ataman, 2026 Renaissance Learning Inc
maintainer:         Freckle Education
author:             Ozgun Ataman
homepage:           https://github.com/freckle/ua-parser#readme
bug-reports:        https://github.com/freckle/ua-parser/issues
synopsis:           Parsers for User-Agent strings
description:
    Parses User-Agent strings into browser, operating system, and device details,
    using the regexes from <https://github.com/ua-parser/uap-core uap-core>.

category:           Web
build-type:         Simple
data-files:
    deps/uap-core/regexes.yaml
    deps/uap-core/test_resources/additional_os_tests.yaml
    deps/uap-core/test_resources/firefox_user_agent_strings.yaml
    deps/uap-core/test_resources/opera_mini_user_agent_strings.yaml
    deps/uap-core/test_resources/pgts_browser_list-orig.yaml
    deps/uap-core/test_resources/pgts_browser_list.yaml
    deps/uap-core/test_resources/podcasting_user_agent_strings.yaml
    deps/uap-core/tests/test_device.yaml
    deps/uap-core/tests/test_os.yaml
    deps/uap-core/tests/test_ua.yaml

extra-source-files:
    README.md
    changelog.md
    package.yaml
    src/Web/UAParser/SuiteUtils.hs

source-repository head
    type:     git
    location: https://github.com/freckle/ua-parser

flag lib-werror
    description: Build with -Werror
    default:     False
    manual:      True

library
    exposed-modules:    Web.UAParser
    hs-source-dirs:     src
    default-language:   GHC2021
    default-extensions:
        DeriveAnyClass NamedFieldPuns NoImplicitPrelude
        NoMonomorphismRestriction OverloadedStrings TemplateHaskell

    ghc-options:        -Wall
    build-depends:
        aeson >=0.7,
        base >=4.17.2.1 && <5,
        bytestring >=0.11.5.3,
        cereal >=0.5.8.3,
        cereal-text >=0.1.0.2,
        data-default >=0.7.1.1,
        deepseq >=1.4.8.0,
        file-embed >=0.0.15.0 && <0.1,
        pcre-light >=0.4.1.2,
        text >=2.0.2,
        yaml >=0.8.3

    if flag(lib-werror)
        ghc-options: -Werror

test-suite test
    type:               exitcode-stdio-1.0
    main-is:            Main.hs
    hs-source-dirs:     src test
    other-modules:
        Web.UAParser
        Web.UAParser.SuiteUtils
        Paths_freckle_ua_parser

    default-language:   GHC2021
    default-extensions:
        DeriveAnyClass NamedFieldPuns NoImplicitPrelude
        NoMonomorphismRestriction OverloadedStrings TemplateHaskell

    ghc-options:        -Wall -O2 -fwarn-tabs
    build-depends:
        HUnit >=1.6.2.0,
        aeson >=0.7,
        base >=4.17.2.1 && <5,
        bytestring >=0.11.5.3,
        cereal >=0.5.8.3,
        cereal-text >=0.1.0.2,
        data-default >=0.7.1.1,
        deepseq >=1.4.8.0,
        file-embed >=0.0.15.0 && <0.1,
        filepath >=1.4.2.2,
        pcre-light >=0.4.1.2,
        tasty >=1.4.3,
        tasty-hunit >=0.10.1,
        tasty-quickcheck >=0.10.2,
        text >=2.0.2,
        yaml >=0.8.3

    if flag(lib-werror)
        ghc-options: -Werror

benchmark bench
    type:               exitcode-stdio-1.0
    main-is:            Main.hs
    hs-source-dirs:     bench src
    other-modules:
        Web.UAParser
        Web.UAParser.SuiteUtils
        Paths_freckle_ua_parser

    default-language:   GHC2021
    default-extensions:
        DeriveAnyClass NamedFieldPuns NoImplicitPrelude
        NoMonomorphismRestriction OverloadedStrings TemplateHaskell

    ghc-options:        -Wall -threaded -rtsopts -with-rtsopts=-N
    build-depends:
        aeson >=0.7,
        base >=4.17.2.1 && <5,
        bytestring >=0.11.5.3,
        cereal >=0.5.8.3,
        cereal-text >=0.1.0.2,
        criterion >=1.6.1.0,
        data-default >=0.7.1.1,
        deepseq >=1.4.8.0,
        file-embed >=0.0.15.0 && <0.1,
        filepath >=1.4.2.2,
        freckle-ua-parser,
        pcre-light >=0.4.1.2,
        text >=2.0.2,
        yaml >=0.8.3

    if flag(lib-werror)
        ghc-options: -Werror