cabal-version:       2.4
name:                PyF
version:             0.9.0.3
synopsis:            Quasiquotations for a python like interpolated string formatter
description:         Quasiquotations for a python like interpolated string formatter.
license:             BSD-3-Clause
license-file:        LICENSE
author:              Guillaume Bouchard
maintainer:          guillaum.bouchard@gmail.com
category:            Text
build-type:          Simple
extra-source-files:  ChangeLog.md Readme.md test/golden/*.golden

Flag python_test
    Description: Enable extensive python testing
    Manual: True
    Default: False

library
  exposed-modules:
                  PyF
                  PyF.Class
                  PyF.Internal.PythonSyntax
                  PyF.Internal.Meta
                  PyF.Internal.QQ
                  PyF.Formatters
                  PyF.Internal.ParserEx
                  PyF.Internal.Parser

  build-depends:       base >= 4.9 && < 5.0
                     , bytestring
                     , template-haskell
                     , text
                     , time
                     , parsec
                     , mtl
                     , ghc
                     , ghc-boot
  hs-source-dirs: src
  ghc-options: -Wall -Wunused-packages -Wincomplete-uni-patterns
  default-language:    Haskell2010
  default-extensions: QuasiQuotes

test-suite pyf-test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  other-modules: SpecUtils SpecCustomDelimiters
  build-depends:       base, PyF, hspec, template-haskell, text, bytestring, time
  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N -Wunused-packages
  default-language:    Haskell2010
  if flag(python_test)
    cpp-options: -DPYTHON_TEST
    build-depends:       process

test-suite pyf-overloaded
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             SpecOverloaded.hs
  build-depends:       base, PyF, hspec, text, bytestring
  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N -Wunused-packages
  default-language:    Haskell2010

test-suite pyf-failure
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             SpecFail.hs
  build-depends:       base, hspec, text, process, hspec, temporary, filepath, deepseq, HUnit
  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N -Wunused-packages
  default-language:    Haskell2010

source-repository head
  type:     git
  location: http://github.com/guibou/PyF