cabal-version:      3.0
name:               custom-interpolation
version:            0.1.0.1
synopsis:           Customizable string interpolation quasiquoters
description:
  Please see the readme at https://github.com/ruby0b/custom-interpolation#readme.

license:            BSD-3-Clause
license-file:       LICENSE
author:             ruby0b
maintainer:         ruby0b
category:           Interpolation, QuasiQuotes, Text
homepage:           https://github.com/ruby0b/custom-interpolation
tested-with:        GHC ==8.10.7 || ==9.2.5 || ==9.4.4
extra-doc-files:    readme.md
extra-source-files:
  changelog.md
  readme.md

source-repository head
  type:     git
  location: git://github.com/ruby0b/custom-interpolation.git

library
  -- cabal-fmt: expand src
  exposed-modules:
    CustomInterpolation
    CustomInterpolation.Config
    CustomInterpolation.Parser
    CustomInterpolation.TH

  default-extensions:
    ExistentialQuantification
    FlexibleContexts
    LambdaCase
    MultiWayIf
    NamedFieldPuns
    QuasiQuotes
    RecordWildCards
    StrictData
    TemplateHaskell
    TupleSections

  build-depends:
    , base                >=4.14 && <5
    , data-default-class  ^>=0.1
    , haskell-src-meta    >=0.6  && <0.9
    , mtl                 >=2.1  && <2.4
    , parsec              ^>=3.1
    , template-haskell    >=2.16 && <2.20

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

test-suite simple-tests
  type:             exitcode-stdio-1.0
  main-is:          Main.hs

  -- cabal-fmt: expand test/simple -Main
  other-modules:    QQ
  hs-source-dirs:   test/simple
  build-depends:
    , base
    , custom-interpolation
    , template-haskell

  ghc-options:      -Wall -Wno-type-defaults -Wno-missing-signatures
  default-language: Haskell2010

flag doctests
  description:
    Run doctests using doctests-parallel, disabled by default due to https://github.com/martijnbastiaan/doctest-parallel/issues/22

  default:     False
  manual:      True

test-suite doctests
  if !flag(doctests)
    buildable: False

  type:             exitcode-stdio-1.0
  hs-source-dirs:   test/doctests
  main-is:          Main.hs
  ghc-options:      -threaded -Wno-type-defaults
  build-depends:
    , base
    , custom-interpolation
    , doctest-parallel      >=0.1

  default-language: Haskell2010