-- Initial yate.cabal generated by cabal init.  For further documentation,
-- see http://haskell.org/cabal/users-guide/

name:                  yate
version:               0.1.0.0
synopsis:              Yet Another Template Engine
description:           Agnostic pure template engine
license:               BSD3
license-file:          LICENSE
author:                Thomas Feron
maintainer:            tho.feron@gmail.com
category:              Text
build-type:            Simple
cabal-version:         >=1.10

flag NoAeson
  description:         Set this flag if you don't want to build aeson
  default:             False

library
  ghc-options:         -Wall
  hs-source-dirs:      src
  default-language:    Haskell2010

  default-extensions:  OverloadedStrings

  exposed-modules:     Text.Yate
                       Text.Yate.Engine
                       Text.Yate.Engine.Internal
                       Text.Yate.Parser
                       Text.Yate.Parser.Internal
                       Text.Yate.TH
                       Text.Yate.Types

  if flag(NoAeson)
    cpp-options:       -DNoAeson

    build-depends:     base >=4.7 && <4.8
                     , attoparsec >=0.12.0.0
                     , mtl
                     , text
                     , unordered-containers
                     , vector
                     , template-haskell >=2.9
  else
    build-depends:     base >=4.7 && <4.8
                     , attoparsec >=0.12.0.0
                     , mtl
                     , text
                     , unordered-containers
                     , vector
                     , template-haskell >=2.9
                     , aeson
                     , scientific

test-suite unit
  type:                exitcode-stdio-1.0
  ghc-options:         -Wall
  main-is:             Suite.hs
  hs-source-dirs:      tests
  default-extensions:  OverloadedStrings
  default-language:    Haskell2010
  build-depends:       base >=4.7 && <4.8
                     , hspec
                     , yate
                     , attoparsec
                     , mtl
                     , unordered-containers
                     , vector