packages feed

seonbi-0.2.2: seonbi.cabal

cabal-version: 1.24

-- This file has been generated from package.yaml by hpack version 0.34.4.
--
-- see: https://github.com/sol/hpack

name:           seonbi
version:        0.2.2
synopsis:       SmartyPants for Korean language
description:    Please see the README.md on GitHub at <https://github.com/dahlia/seonbi>.
category:       Text
homepage:       https://github.com/dahlia/seonbi
bug-reports:    https://github.com/dahlia/seonbi/issues
author:         Hong Minhee <hong.minhee@gmail.com>
maintainer:     Hong Minhee <hong.minhee@gmail.com>
copyright:      © 2018–2021 Hong Minhee
license:        LGPL-2.1
license-file:   LICENSE
build-type:     Custom
extra-source-files:
    src/Text/Seonbi/Unihan/kHangul.json
    CHANGES.md
    README.md
data-files:
    ko-kr-stdict.tsv
data-dir:       data

source-repository head
  type: git
  location: git://github.com/dahlia/seonbi.git

custom-setup
  setup-depends:
      Cabal
    , base
    , bytestring
    , directory ==1.*
    , filepath
    , http-client >=0.5 && <0.7
    , temporary >=1.2 && <1.4
    , text
    , zip >=1.1 && <1.3

flag embed-dictionary
  description: Embed dictionary rather than load from file
  manual: True
  default: False

flag iconv
  description: Use iconv
  manual: True
  default: False

flag static
  description: Static link
  manual: True
  default: False

library
  exposed-modules:
      Text.Seonbi.Facade
      Text.Seonbi.Hangul
      Text.Seonbi.Hanja
      Text.Seonbi.Html
      Text.Seonbi.Html.Clipper
      Text.Seonbi.Html.Entity
      Text.Seonbi.Html.Preservation
      Text.Seonbi.Html.Printer
      Text.Seonbi.Html.Scanner
      Text.Seonbi.Html.Tag
      Text.Seonbi.Html.TagStack
      Text.Seonbi.Html.TextNormalizer
      Text.Seonbi.Html.Wrapper
      Text.Seonbi.PairedTransformer
      Text.Seonbi.Punctuation
      Text.Seonbi.Trie
      Text.Seonbi.Unihan.KHangul
  other-modules:
      Paths_seonbi
  hs-source-dirs:
      src
  build-depends:
      aeson >=1.3.1 && <1.5
    , attoparsec >=0.12 && <1
    , base >=4.7 && <5
    , bytestring
    , cassava ==0.5.*
    , containers
    , data-default >=0.2 && <1
    , file-embed >=0.0.10 && <0.0.12
    , filepath ==1.*
    , text
    , text-trie >=0.2.5 && <0.3
  if os(darwin)
    ghc-options: -Wall -fprint-explicit-kinds -optP-Wno-nonportable-include-path
  else
    ghc-options: -Wall -fprint-explicit-kinds
  if flag(static) || flag(embed-dictionary)
    cpp-options: -DEMBED_DICTIONARY
  else
    cpp-options: -DNO_EMBED_DICTIONARY
  default-language: Haskell2010

executable seonbi
  main-is: seonbi.hs
  other-modules:
      Paths_seonbi
  hs-source-dirs:
      app
  build-depends:
      aeson >=1.3.1 && <1.5
    , base >=4.7 && <5
    , bytestring
    , containers
    , text
  if os(darwin)
    ghc-options: -Wall -fprint-explicit-kinds -optP-Wno-nonportable-include-path
  else
    ghc-options: -Wall -fprint-explicit-kinds
  if flag(iconv)
    cpp-options: -DICONV
    build-depends:
        cases ==0.1.3.2
      , html-charset ==0.1.*
      , iconv ==0.4.*
      , optparse-applicative ==0.14.*
      , seonbi
  else
    build-depends:
        cases ==0.1.3.2
      , html-charset ==0.1.*
      , optparse-applicative ==0.14.*
      , seonbi
  if flag(static)
    ld-options: -static
    if os(darwin) || os(windows)
      ghc-options: -Wall -fwarn-incomplete-uni-patterns -threaded -rtsopts -with-rtsopts=-N -static -optc-Os
    else
      ghc-options: -Wall -fwarn-incomplete-uni-patterns -threaded -rtsopts -with-rtsopts=-N -static -optl-static -optl-pthread -optc-Os -fPIC
  else
    ghc-options: -Wall -fwarn-incomplete-uni-patterns -threaded -rtsopts -with-rtsopts=-N
  default-language: Haskell2010

executable seonbi-api
  main-is: seonbi-api.hs
  other-modules:
      Paths_seonbi
  hs-source-dirs:
      app
  build-depends:
      aeson >=1.3.1 && <1.5
    , base >=4.7 && <5
    , bytestring
    , containers
    , http-types ==0.12.*
    , optparse-applicative ==0.14.*
    , seonbi
    , text
    , wai >=3.2 && <3.4
    , warp >=3.2 && <3.4
  if os(darwin)
    ghc-options: -Wall -fprint-explicit-kinds -optP-Wno-nonportable-include-path
  else
    ghc-options: -Wall -fprint-explicit-kinds
  if flag(static)
    ld-options: -static
    if os(darwin) || os(windows)
      ghc-options: -Wall -fwarn-incomplete-uni-patterns -threaded -rtsopts -with-rtsopts=-N -static -optc-Os
    else
      ghc-options: -Wall -fwarn-incomplete-uni-patterns -threaded -rtsopts -with-rtsopts=-N -static -optl-static -optl-pthread -optc-Os -fPIC
  else
    ghc-options: -Wall -fwarn-incomplete-uni-patterns -threaded -rtsopts -with-rtsopts=-N
  default-language: Haskell2010

test-suite doctest
  type: exitcode-stdio-1.0
  main-is: doctest.hs
  hs-source-dirs:
      test
  ghc-options: -threaded
  build-depends:
      QuickCheck
    , aeson >=1.3.1 && <1.5
    , base >=4.7 && <5
    , bytestring
    , containers
    , doctest
    , doctest-discover
    , seonbi
    , text
    , unicode-show
  if os(darwin)
    ghc-options: -Wall -fprint-explicit-kinds -optP-Wno-nonportable-include-path
  else
    ghc-options: -Wall -fprint-explicit-kinds
  default-language: Haskell2010

test-suite hlint
  type: exitcode-stdio-1.0
  main-is: hlint.hs
  hs-source-dirs:
      test
  ghc-options: -threaded
  build-depends:
      aeson >=1.3.1 && <1.5
    , base >=4.7 && <5
    , bytestring
    , containers
    , hlint >=2.1.7 && <2.2
    , text
  if os(darwin)
    ghc-options: -Wall -fprint-explicit-kinds -optP-Wno-nonportable-include-path
  else
    ghc-options: -Wall -fprint-explicit-kinds
  default-language: Haskell2010

test-suite spec
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  other-modules:
      Text.Seonbi.FacadeSpec
      Text.Seonbi.HangulSpec
      Text.Seonbi.HanjaSpec
      Text.Seonbi.Html.ClipperSpec
      Text.Seonbi.Html.PreservationSpec
      Text.Seonbi.Html.PrinterSpec
      Text.Seonbi.Html.ScannerSpec
      Text.Seonbi.Html.TextNormalizerSpec
      Text.Seonbi.Html.WrapperSpec
      Text.Seonbi.PunctuationSpec
      Text.Seonbi.Unihan.KHangulSpec
      Paths_seonbi
  hs-source-dirs:
      test
  ghc-options: -Wno-incomplete-uni-patterns -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      Diff >=0.3.4 && <0.4
    , aeson >=1.3.1 && <1.5
    , base >=4.7 && <5
    , bytestring
    , containers
    , directory ==1.*
    , filepath ==1.*
    , hspec >=2.4.8 && <3
    , hspec-discover >=2.4.8 && <3
    , interpolatedstring-perl6 >=1.0.1 && <2
    , random ==1.1.*
    , seonbi
    , text
  if os(darwin)
    ghc-options: -Wall -fprint-explicit-kinds -optP-Wno-nonportable-include-path
  else
    ghc-options: -Wall -fprint-explicit-kinds
  default-language: Haskell2010