Safe Haskell | None |
---|---|
Language | Haskell2010 |
Algorithms.DFA.KMP.Automaton
Description
KMP algorithm implementation based on Deterministic Finite Automaton Automata lpws = the longets suffix which is a prefix length
- newtype Index = Index Int
- data Jump a
- type Process a = a -> Jump (Automaton a)
- newtype Automaton a = Automaton (Process a)
- data Interface a = Interface {}
- type Query a = Index -> Automaton a
- core :: Eq a => Query a -> Interface a -> Process a
- run :: Automaton a -> [a] -> Maybe (Automaton a)
- automaton :: Eq a => NonEmpty (Interface a) -> Automaton a