Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
Documentation
Index to select the DFA states
Target of a transition
API
create a Resolve
run the automata against a stream . Nothing represent an Accept state