Portability | portable |
---|---|
Stability | experimental |
Maintainer | fuuzetsu@fuuzetsu.co.uk |
Safe Haskell | None |
- empty :: Trie
- insert :: String -> Trie -> Trie
- fromString :: String -> Trie
- fromList :: [String] -> Trie
- toList :: Trie -> [String]
- lookupPrefix :: MonadPlus m => String -> Trie -> m Trie
- forcedNext :: Trie -> String
- data Trie
- possibleSuffixes :: String -> Trie -> [String]
- certainSuffix :: String -> Trie -> String
Documentation
fromString :: String -> TrieSource
lookupPrefix :: MonadPlus m => String -> Trie -> m TrieSource
Takes a trie and a prefix and returns the sub-trie that of words with that prefix
forcedNext :: Trie -> StringSource
Finds the longest certain path down the trie starting at a the root
Invariant Assumption: All paths have at least one true
node below them
possibleSuffixes :: String -> Trie -> [String]Source
Helper function, finds all the suffixes of a given prefix
certainSuffix :: String -> Trie -> StringSource
Helper function, finds the longest certain path down the trie starting at a given word