A set of needles with associated values, and Boyer-Moore automata to efficiently find those needles.
INVARIANT: searcherAutomaton = BoyerMoore.buildAutomaton . searcherNeedles To enforce this invariant, the fields are not exposed from this module. There is a separate constructor function.
The purpose of this wrapper is to have a type that is Hashable and Eq, so we can derive those for the types that embed the searcher, whithout requiring the automaton itself to be Hashable or Eq, which would be both wasteful and tedious. Because the automaton is fully determined by the needles and associated values, it is sufficient to implement Eq and Hashable in terms of the needles only.
We also use Hashed to cache the hash of the needles.
Instances6Eq, Show, Generic, NFData, Hashable, Rep
Eq v => Eq (Searcher v)Defined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMooreCI.SearcherShow (Searcher v)Defined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMooreCI.SearcherGeneric (Searcher v)Defined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMooreCI.SearcherNFData v => NFData (Searcher v)Defined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMooreCI.SearcherHashable v => Hashable (Searcher v)Defined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMooreCI.Searchertype Rep (Searcher v) = D1 ('MetaDataDefined in alfred-margaret-2.1.1.1 · Data.Text.BoyerMooreCI.Searcher"Searcher"
"Data.Text.BoyerMooreCI.Searcher"
"alfred-margaret-2.1.1.1-ASFUiU1mFjDAljTyYzURM4"
'False) (C1 ('MetaCons"Searcher"
'PrefixI 'True) (S1 ('MetaSel ('Just"searcherNeedles"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hashed [(Text, v)])) :*: (S1 ('MetaSel ('Just"searcherNumNeedles"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just"searcherAutomata"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Automaton, v)]))))