packages feed

stache-2.4.0: stache.cabal

cabal-version:   2.4
name:            stache
version:         2.4.0
license:         BSD-3-Clause
license-file:    LICENSE
maintainer:      Mark Karpov <markkarpov92@gmail.com>
author:          Mark Karpov <markkarpov92@gmail.com>
tested-with:     ghc ==9.10.3 ghc ==9.12.4 ghc ==9.14.1
homepage:        https://github.com/mrkkrp/stache
bug-reports:     https://github.com/mrkkrp/stache/issues
synopsis:        Mustache templates for Haskell
description:     Mustache templates for Haskell.
category:        Text
build-type:      Simple
data-files:
    bench-data/*.mustache
    specification/*.yml
    templates/*.mustache

extra-doc-files:
    CHANGELOG.md
    README.md

source-repository head
    type:     git
    location: https://github.com/mrkkrp/stache.git

flag dev
    description: Turn on development settings.
    default:     False
    manual:      True

library
    exposed-modules:
        Text.Mustache
        Text.Mustache.Compile
        Text.Mustache.Compile.TH
        Text.Mustache.Parser
        Text.Mustache.Render
        Text.Mustache.Render.Internal
        Text.Mustache.Type

    default-language: GHC2021
    build-depends:
        aeson >=2 && <3,
        base >=4.15 && <5,
        containers >=0.5 && <0.9,
        deepseq >=1.4 && <1.6,
        directory >=1.2 && <1.4,
        filepath >=1.2 && <1.6,
        megaparsec >=7 && <10,
        mtl >=2.1 && <3,
        template-haskell >=2.11 && <2.25,
        text >=1.2 && <2.2,
        vector >=0.11 && <0.14

    if flag(dev)
        ghc-options:
            -Wall -Werror -Wredundant-constraints -Wpartial-fields
            -Wunused-packages

    else
        ghc-options: -O2 -Wall

executable stache
    main-is:          Main.hs
    hs-source-dirs:   app
    other-modules:    Paths_stache
    autogen-modules:  Paths_stache
    default-language: GHC2021
    build-depends:
        aeson >=2 && <3,
        base >=4.15 && <5,
        gitrev >=1.3 && <1.4,
        optparse-applicative >=0.14 && <0.20,
        stache,
        text >=0.2 && <2.2,
        yaml >=0.8 && <0.12,
        filepath >=1.2 && <1.6

    if flag(dev)
        ghc-options:
            -Wall -Werror -Wredundant-constraints -Wpartial-fields
            -Wunused-packages -Wno-unused-imports

    else
        ghc-options: -O2 -Wall

test-suite tests
    type:               exitcode-stdio-1.0
    main-is:            Spec.hs
    build-tool-depends: hspec-discover:hspec-discover >=2 && <3
    hs-source-dirs:     tests
    other-modules:
        Text.Mustache.Compile.THSpec
        Text.Mustache.ParserSpec
        Text.Mustache.RenderSpec
        Text.Mustache.TypeSpec

    default-language:   GHC2021
    build-depends:
        aeson >=2 && <3,
        base >=4.15 && <5,
        containers >=0.5 && <0.9,
        hspec >=2 && <3,
        hspec-megaparsec >=2 && <3,
        megaparsec >=7 && <10,
        stache,
        text >=1.2 && <2.2

    if flag(dev)
        ghc-options:
            -Wall -Werror -Wredundant-constraints -Wpartial-fields
            -Wunused-packages

    else
        ghc-options: -O2 -Wall

test-suite mustache-spec
    type:             exitcode-stdio-1.0
    main-is:          Spec.hs
    hs-source-dirs:   mustache-spec
    default-language: GHC2021
    build-depends:
        aeson >=2 && <3,
        base >=4.15 && <5,
        bytestring >=0.10 && <0.13,
        containers >=0.5 && <0.9,
        file-embed,
        hspec >=2 && <3,
        megaparsec >=7 && <10,
        stache,
        text >=1.2 && <2.2,
        yaml >=0.8 && <0.12

    if flag(dev)
        ghc-options:
            -Wall -Werror -Wredundant-constraints -Wpartial-fields
            -Wunused-packages

    else
        ghc-options: -O2 -Wall

benchmark bench
    type:             exitcode-stdio-1.0
    main-is:          Main.hs
    hs-source-dirs:   bench
    default-language: GHC2021
    build-depends:
        aeson >=2 && <3,
        base >=4.15 && <5,
        criterion >=0.6.2.1 && <1.7,
        deepseq >=1.4 && <1.6,
        megaparsec >=7 && <10,
        stache,
        text >=1.2 && <2.2

    if flag(dev)
        ghc-options:
            -Wall -Werror -Wredundant-constraints -Wpartial-fields
            -Wunused-packages

    else
        ghc-options: -O2 -Wall