cabal-version:  2.2
name:           heist
version:        1.1.1.2
x-revision:     4
synopsis:       An Haskell template system supporting both HTML5 and XML.
description:
    Heist is a powerful template system that supports both HTML5 and XML.
    Some of Heist's features are:
    .
    * Designer-friendly HTML5 (or XML) syntax
    .
    * Templates can be reloaded to make changes visible without recompiling
      your Haskell code
    .
    * Enforces near-perfect separation of business logic and view
    .
    * Powerful abstraction primitives allowing you to eliminate repetition
    .
    * Easy creation of domain-specific markup languages
    .
    * Built-in support for including JSON and Markdown content in templates
    .
    * Simple mechanism for designer-specified template caching
    .
    * Optional merging of multiple \<head\> tags defined anywhere in the
      document
license:        BSD-3-Clause
license-file:   LICENSE
author:         Doug Beardsley, Gregory Collins
maintainer:     snap@snapframework.com
build-type:     Simple
homepage:       http://snapframework.com/
category:       Web, Snap

tested-with:
  GHC == 8.8.4
  GHC == 8.10.7
  GHC == 9.0.2
  GHC == 9.2.8
  GHC == 9.4.8
  GHC == 9.6.6
  GHC == 9.8.4
  GHC == 9.10.1

extra-doc-files:
  CHANGELOG.md

extra-source-files:
  .ghci,
  CONTRIBUTORS,
  docs/Makefile,
  docs/templates.css,
  docs/templates.md,
  examples/ex01/home.tpl,
  examples/ex01/nav.tpl,
  examples/ex02/default.tpl,
  examples/ex02/home.tpl,
  examples/ex03/default.tpl,
  examples/ex03/home.tpl,
  examples/test01.tpl,
  examples/test02.tpl,
  extra/haddock.css,
  extra/hscolour.css,
  extra/logo.gif,
  haddock.sh,
  LICENSE,
  README.md,
  README.SNAP.md,
  test/suite/Benchmark.hs,
  test/suite/Heist/Compiled/Tests.hs,
  test/suite/Heist/Interpreted/Tests.hs,
  test/suite/Heist/TestCommon.hs,
  test/suite/Heist/Tests.hs,
  test/suite/Heist/Tutorial/AttributeSplices.lhs,
  test/suite/Heist/Tutorial/CompiledSplices.lhs,
  test/suite/Heist/Tutorial/Imports.hs,
  test/suite/TestSuite.hs,
  test/templates/a.tpl,
  test/templates/attr_splice.tpl,
  test/templates/attrs.tpl,
  test/templates/attrsubtest1.tpl,
  test/templates/attrsubtest2.tpl,
  test/templates/backslash.tpl
  test/templates/bar/a.tpl,
  test/templates/bar/index.tpl,
  test/templates/bind-apply-interaction/_outer.tpl,
  test/templates/bind-apply-interaction/caller.tpl,
  test/templates/bind-attrs.tpl,
  test/templates/bind_param.tpl,
  test/templates/cache.tpl,
  test/templates/div_expansion.tpl,
  test/templates/foo/a.tpl,
  test/templates/foo/b.tpl,
  test/templates/foo/markdown-chdir.tpl,
  test/templates/foo/markdown-origdir.tpl,
  test/templates/foo/test2.md,
  test/templates/head_merge/index.tpl,
  test/templates/head_merge/nav.tpl,
  test/templates/head_merge/wrap.tpl,
  test/templates/index.tpl,
  test/templates/ioc.tpl,
  test/templates/json.tpl,
  test/templates/json_array.tpl
  test/templates/json_object.tpl,
  test/templates/json_snippet.tpl,
  test/templates/markdown.tpl,
  test/templates/namespaces.tpl
  test/templates/page.tpl,
  test/templates/pandoc.tpl
  test/templates/pandocdiv.tpl
  test/templates/people.tpl,
  test/templates/post.tpl,
  test/templates/readme.txt,
  test/templates/rss.xtpl
  test/templates/test.md,
  test/templates/textarea_expansion.tpl,
  test/templates/title_expansion.tpl,
  test/templates/user/admin/main.tpl,
  test/templates/user/admin/menu.tpl,
  test/templates/user/main.tpl,
  test/templates/user/menu.tpl,
  test/templates-bad/apply-missing-attr.tpl,
  test/templates-bad/apply-template-not-found.tpl,
  test/templates-bad/bind-infinite-loop.tpl,
  test/templates-bad/bind-missing-attr.tpl,
  test/templates-defer/test.tpl,
  test/templates-loaderror/_error.tpl,
  test/templates-loaderror/_ok.tpl,
  test/templates-loaderror/test.tpl,
  test/templates-nsbind/nsbind.tpl,
  test/templates-nsbind/nsbinderror.tpl,
  test/templates-ns-nested/test.tpl,
  test/templates-nscall/_call.tpl,
  test/templates-nscall/_invalid.tpl,
  test/templates-nscall/nscall.tpl,
  TODO

common universal
  default-language: Haskell2010

  default-extensions:
    DeriveDataTypeable
    FlexibleInstances
    GeneralizedNewtypeDeriving
    MultiParamTypeClasses
    OverloadedStrings
    PackageImports
    ScopedTypeVariables
    TypeSynonymInstances

  build-depends:
    , base >= 4.5 && < 5

  if !impl(ghc >= 8.0)
    build-depends:
      semigroups >= 0.16 && < 0.19,

Library
  import: universal
  hs-source-dirs: src

  exposed-modules:
    Heist,
    Heist.Compiled,
    Heist.Compiled.LowLevel,
    Heist.Internal.Types,
    Heist.Interpreted,
    Heist.Splices,
    Heist.Splices.Apply,
    Heist.Splices.Bind,
    Heist.Splices.BindStrict,
    Heist.Splices.Cache,
    Heist.Splices.Html,
    Heist.Splices.Ignore,
    Heist.Splices.Json,
    Heist.Splices.Markdown,
    Heist.TemplateDirectory

  other-modules:
    Data.HeterogeneousEnvironment,
    Heist.Common,
    Heist.Compiled.Internal,
    Heist.Internal.Types.HeistState,
    Heist.Interpreted.Internal

  build-depends:
    aeson                      >= 0.6     && < 2.3,
    attoparsec                 >= 0.10    && < 0.15,
    blaze-builder              >= 0.2     && < 0.5,
    blaze-html                 >= 0.4     && < 0.10,
    bytestring                 >= 0.9     && < 0.13,
    containers                 >= 0.2     && < 1.0,
    directory                  >= 1.1     && < 1.4,
    directory-tree             >= 0.10    && < 0.13,
    dlist                      >= 0.5     && < 1.1,
    filepath                   >= 1.3     && < 2,
    hashable                   >= 1.1     && < 2,
    lifted-base                >= 0.2     && < 0.3,
    map-syntax                 >= 0.3     && < 0.4,
    monad-control              >= 0.3     && < 1.1,
    mtl                        >= 2.0     && < 2.4,
    process                    >= 1.1     && < 1.7,
    random                     >= 1.0.1.0 && < 2,
    text                       >= 0.10    && < 2.2,
    time                       >= 1.1     && < 2,
    transformers               >= 0.3     && < 0.7,
    transformers-base          >= 0.4     && < 0.5,
    unordered-containers       >= 0.1.4   && < 0.3,
    vector                     >= 0.9     && < 0.14,
    xmlhtml                    >= 0.2.3.5 && < 0.4,
    indexed-traversable        >= 0.1.1   && < 0.2

  ghc-options: -Wall -fwarn-tabs -funbox-strict-fields

  default-extensions:
    UndecidableInstances,
    NoMonomorphismRestriction


source-repository head
  type:     git
  location: https://github.com/snapframework/heist.git

Test-suite testsuite
  import: universal
  hs-source-dirs: src test/suite
  type: exitcode-stdio-1.0
  main-is: TestSuite.hs

  build-depends:
    HUnit                      >= 1.2      && < 2,
    QuickCheck                 >= 2        && < 2.16,
    lens                       >= 4.3      && < 5.4,
    test-framework             >= 0.4      && < 0.9,
    test-framework-hunit       >= 0.2.7    && < 0.4,
    test-framework-quickcheck2 >= 0.2.12.1 && < 0.4,
    aeson,
    attoparsec,
    bifunctors >= 5.3 && < 5.7,
    blaze-builder,
    blaze-html,
    bytestring,
    containers,
    directory,
    directory-tree,
    dlist,
    filepath,
    hashable,
    lifted-base,
    map-syntax,
    monad-control,
    mtl,
    process,
    random,
    text,
    time,
    transformers,
    transformers-base,
    unordered-containers,
    vector,
    xmlhtml,
    indexed-traversable

  if impl(ghc >= 7.8) && impl(ghc < 7.10)
    build-depends: transformers-compat >= 0.3 && < 0.7

  ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -threaded

Benchmark benchmark
  import: universal
  hs-source-dirs: src test/suite
  type: exitcode-stdio-1.0
  main-is: Benchmark.hs

  build-depends:
    HUnit,
    criterion                 >= 1.0,
    criterion-measurement     >= 0.1,
    test-framework,
    test-framework-hunit,

    -- Copied from regular dependencies:

    aeson,
    attoparsec,
    blaze-builder,
    blaze-html,
    bytestring,
    containers,
    directory,
    directory-tree,
    dlist,
    filepath,
    hashable,
    lifted-base,
    map-syntax,
    monad-control,
    mtl,
    process,
    random,
    statistics                 >= 0.11,
    text,
    time,
    transformers,
    transformers-base,
    unordered-containers,
    vector,
    xmlhtml,
    indexed-traversable

  if impl(ghc >= 7.8) && impl(ghc < 7.10)
    build-depends: transformers-compat

  ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -threaded
               -fno-warn-unused-do-bind -rtsopts

  default-extensions:
    UndecidableInstances,
    NoMonomorphismRestriction