word-trie-0.1.0.0: Implementation of a finite trie over words.

LicenseGPL-2
Maintainerfuuzetsu@fuuzetsu.co.uk
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010
Extensions
  • Cpp
  • TemplateHaskell
  • StandaloneDeriving
  • DeriveGeneric

Data.Trie

Description

An implementation of a trie over a words.

Synopsis

Documentation

empty :: Trie Source

A blank Trie

insert :: String -> Trie -> Trie Source

Insert a new string into the trie.

fromList :: [String] -> Trie Source

Take a list of String and compress it into a Trie

toList :: Trie -> [String] Source

Take a trie and expand it into the strings that it represents

lookupPrefix :: MonadPlus m => String -> Trie -> m Trie Source

Takes a trie and a prefix and returns the sub-trie that of words with that prefix

forcedNext :: Trie -> String Source

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

data Trie Source

Instances