-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Implementation of a finite trie over words.
--   
--   Implementation of a finite trie over words.
@package word-trie
@version 0.3.0

-- | An implementation of a trie over a words. Properties:
--   
--   
--   fromList . toList ≡ id
--   toList . fromString ≡ (:[])
--   sort . nub . toList . fromList ≡ sort . nub
--   
module Data.Trie

-- | A blank Trie
empty :: Trie

-- | Insert a new string into the trie.
insert :: String -> Trie -> Trie
fromString :: String -> Trie

-- | Take a list of String and compress it into a Trie
fromList :: [String] -> Trie

-- | Take a trie and expand it into the strings that it represents
toList :: Trie -> [String]

-- | Takes a trie and a prefix and returns the sub-trie that of words with
--   that prefix
lookupPrefix :: MonadPlus m => String -> Trie -> m Trie

-- | 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
forcedNext :: Trie -> String
data Trie

-- | Helper function, finds all the suffixes of a given prefix
possibleSuffixes :: String -> Trie -> [String]

-- | Helper function, finds the longest certain path down the trie starting
--   at a given word
certainSuffix :: String -> Trie -> String
instance GHC.Generics.Generic Data.Trie.Trie
instance GHC.Classes.Eq Data.Trie.Trie
instance GHC.Show.Show Data.Trie.Trie
instance Data.Binary.Class.Binary Data.Trie.Trie
