packages feed

alfred-margaret-2.1.0.2: alfred-margaret.cabal

name:                alfred-margaret
version:             2.1.0.2
synopsis:            Fast Aho-Corasick string searching
description:         An efficient implementation of the Aho-Corasick
                     string searching algorithm.
homepage:            https://github.com/channable/alfred-margaret
license:             BSD3
license-file:        LICENSE
author:              The Alfred-Margaret authors
maintainer:          Ruud van Asseldonk <ruud@channable.com>, Fabian Thorand <fabian@channable.com>
copyright:           2020 Channable
category:            Data, Text
build-type:          Simple
extra-source-files:  README.md
                   , performance.png
cabal-version:       >=1.10
tested-with:
                     -- Nixpkgs unstable (Updated 2022-04-14)
                     GHC == 8.8.4
                     -- Nixpkgs unstable (Updated 2022-04-14)
                   , GHC == 8.10.7
                     -- Nixpkgs unstable (Updated 2022-04-14)
                   , GHC == 9.0.2
                     -- Nixpkgs unstable (Updated 2024-09-05)
                   , GHC == 9.6.6

source-repository head
  type:     git
  location: https://github.com/channable/alfred-margaret

Flag aeson
    Description: Enable aeson support
    Manual: False
    Default: True

-- Compile this package with LLVM, rather than with the default code generator.
-- LLVM produces about 20% faster code.
Flag llvm
  Description: Compile with LLVM
  Manual: True
  -- Defaulting to false makes the package buildable by Hackage,
  -- allowing the documentation to be generated for us.
  Default: False

library
  hs-source-dirs:      src
  exposed-modules:     Data.Text.CaseSensitivity
                     , Data.Text.Utf8
                     , Data.Text.Utf8.Unlower
                     , Data.Text.AhoCorasick.Automaton
                     , Data.Text.AhoCorasick.Replacer
                     , Data.Text.AhoCorasick.Searcher
                     , Data.Text.AhoCorasick.Splitter
                     , Data.Text.BoyerMoore.Automaton
                     , Data.Text.BoyerMoore.Replacer
                     , Data.Text.BoyerMoore.Searcher
                     , Data.Text.BoyerMooreCI.Automaton
                     , Data.Text.BoyerMooreCI.Replacer
                     , Data.Text.BoyerMooreCI.Searcher
                     , Data.TypedByteArray
  build-depends:
      base             >= 4.7 && < 5
    , containers       >= 0.6 && < 0.8
    , deepseq          >= 1.4 && < 1.6
    , hashable         >= 1.4.0.2 && < 1.6
    , primitive        >= 0.6.4 && < 0.10
    , text             >= 2.0 && < 2.2
    , unordered-containers >= 0.2.9 && < 0.3
    , vector           >= 0.12 && < 0.14
  ghc-options:         -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -O2
  default-language:    Haskell2010
  if flag(aeson) {
                       -- Even an older version of aeson is fine since
                       -- we only use it for instances
  build-depends:       aeson >= 1.4.2 && < 3
  cpp-options:         -DHAS_AESON
  }
  if flag(llvm) {
  ghc-options:         -fllvm -optlo=-O3 -optlo=-tailcallelim
  }

test-suite test-suite
  type:                exitcode-stdio-1.0
  main-is:             Main.hs
  other-modules:       Data.Text.AhoCorasickSpec
                     , Data.Text.BoyerMooreSpec
                     , Data.Text.BoyerMooreCISpec
                     , Data.Text.Utf8Spec
                     , Data.Text.TestInstances
  hs-source-dirs:      tests
  ghc-options:         -Wall -Wincomplete-record-updates -Wno-orphans
  build-depends:       base >= 4.7 && < 5
                     , QuickCheck
                     , alfred-margaret
                     , deepseq
                     , hspec
                     , hspec-expectations
                     , primitive
                     , quickcheck-instances
                     , text
  default-language:    Haskell2010

benchmark uvector-vs-tba
  type:                exitcode-stdio-1.0
  main-is:             Main.hs
  hs-source-dirs:      bench/uvector-vs-tba
  ghc-options:         -Wall -Wincomplete-record-updates -Wno-orphans
  build-depends:       base >= 4.7 && < 5
                     , alfred-margaret
                     , vector
                     , deepseq
                     , criterion
  default-language:    Haskell2010

benchmark bm
  type:                exitcode-stdio-1.0
  main-is:             Main.hs
  hs-source-dirs:      bench/bm
  ghc-options:         -Wall -Wincomplete-record-updates -Wno-orphans
  build-depends:       base >= 4.7 && < 5
                     , alfred-margaret
                     , deepseq
                     , criterion
                     , text
  default-language:    Haskell2010

executable dump-automaton
  main-is: Main.hs
  hs-source-dirs:
    app/dump-automaton
  build-depends:   base
                 , alfred-margaret
  default-language: Haskell2010