cabal-version: 1.18

name:           string-interpolate
version:        0.3.4.0
x-revision: 2
synopsis:       Haskell string/text/bytestring interpolation that just works
description:    Unicode-aware string interpolation that handles all textual types.
                .
                See the README at <https://gitlab.com/williamyaoh/string-interpolate/blob/master/README.md> for more info.
category:       Data, Text
homepage:       https://gitlab.com/williamyaoh/string-interpolate/blob/master/README.md
bug-reports:    https://gitlab.com/williamyaoh/string-interpolate/issues
author:         William Yao
maintainer:     williamyaoh@gmail.com
copyright:      2019-2024 William Yao
license:        BSD3
license-file:   LICENSE
build-type:     Simple
extra-doc-files:
    README.md
    CHANGELOG.md

source-repository head
  type: git
  location: https://www.gitlab.com/williamyaoh/string-interpolate.git

flag extended-benchmarks
     description: Enable benchmarks for Interpolation and interpolatedstring-perl6
     manual: True
     default: False

flag text-builder
     description:
       Use Text Builders to construct Text outputs instead of the
       Text type itself. If you're regularly constructing large (>50KB)
       text objects, enabling this can speed up your code. Otherwise,
       enabling this is likely to be a net slowdown.
     manual: False
     default: False

flag bytestring-builder
     description:
       Use ByteString Builders to construct ByteString outputs instead of
       the ByteString type itself. If you're regularly constructing large
       (>50KB) bytestrings, enabling this can speed up your code. Otherwise,
       enabling this is likely to be a net slowdown.
     manual: False
     default: False

library
    exposed-modules:
        Data.String.Interpolate
        Data.String.Interpolate.Conversion
        Data.String.Interpolate.Conversion.TextSink
        Data.String.Interpolate.Conversion.ByteStringSink
        Data.String.Interpolate.Types
        Data.String.Interpolate.Parse
    other-modules:
        Data.String.Interpolate.Conversion.Classes
        Data.String.Interpolate.Conversion.Encoding
        Data.String.Interpolate.Lines
        Data.String.Interpolate.Whitespace
        Paths_string_interpolate
    hs-source-dirs:
        src/lib
    ghc-options: -Wall -Wcompat -Wincomplete-record-updates
                 -Wincomplete-uni-patterns -Wredundant-constraints
                 -Wnoncanonical-monad-instances -fno-warn-name-shadowing
    if flag(text-builder)
      cpp-options: -DTEXT_BUILDER
    if flag(bytestring-builder)
      cpp-options: -DBYTESTRING_BUILDER
    build-depends:
        base >=4.11 && <5
      , bytestring <0.13
      , text <2.2
      , split <0.3
      , haskell-src-exts <1.24
      , haskell-src-meta <0.9
      , template-haskell <2.24
      , text-conversions <0.4
      , utf8-string <1.1
    default-language: Haskell2010

test-suite string-interpolate-test
    type: exitcode-stdio-1.0
    main-is: spec.hs
    other-modules:
        Paths_string_interpolate
    hs-source-dirs: test
    ghc-options: -threaded -rtsopts -with-rtsopts=-N
    build-depends:
        base ==4.*
      , string-interpolate
      , QuickCheck <2.16
      , bytestring <0.13
      , text <2.2
      , template-haskell <2.24
      , hspec ==2.*
      , hspec-core ==2.*
      , quickcheck-instances <0.4
      , quickcheck-text <0.2
      , quickcheck-unicode <1.1
      , unordered-containers <0.3
    default-language: Haskell2010

benchmark string-interpolate-bench
    type: exitcode-stdio-1.0
    main-is: bench.hs
    other-modules:
        Paths_string_interpolate
    hs-source-dirs: bench
    build-depends:
        base ==4.*
      , string-interpolate
      , QuickCheck <2.16
      , bytestring <0.13
      , text <2.2
      , deepseq <1.6
      , criterion <1.7
      , formatting <7.3
      , interpolate <0.3
      , neat-interpolation <0.6
    if flag(extended-benchmarks)
      cpp-options: -DEXTENDED_BENCHMARKS
      build-depends:
          interpolatedstring-perl6 <1.1
        , Interpolation <0.4
    default-language: Haskell2010