HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulealfred-margaret-2.1.1.1Haskell2010

Data.Text.AhoCorasick.Replacer

Implements sequential string replacements based on the Aho-Corasick algorithm.

Contents
  1. State machine
Synopsis

State machine

datadata Payload
#

Constructors

Instances8Eq, Show, Generic, NFData, Hashable, FromJSON, …
datadata Replacer

A state machine used for efficient replacements with many different needles.

Instances8Eq, Show, Generic, NFData, Hashable, FromJSON, …

Build an Aho-Corasick automaton that can be used for performing fast sequential replaces.

Case-insensitive matching performs per-letter language-agnostic lower-casing. Therefore, it will work in most cases, but not in languages where lower-casing depends on the context of the character in question.

We need to revisit this algorithm when we want to implement full Unicode support.