cryptol-2.2.6: Cryptol: The Language of Cryptography

Copyright(c) 2013-2015 Galois, Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Cryptol.REPL.Trie

Description

 

Synopsis

Documentation

data Trie a Source

Maps string names to values, allowing for partial key matches and querying.

Constructors

Node (Map Char (Trie a)) (Maybe a) 

Instances

Show a => Show (Trie a) Source 

insertTrie :: String -> a -> Trie a -> Trie a Source

Insert a value into the Trie. Will call panic if a value already exists with that key.

lookupTrie :: String -> Trie a -> [a] Source

Return all matches with the given prefix.

lookupTrieExact :: String -> Trie a -> [a] Source

Given a key, return either an exact match for that key, or all matches with the given prefix.

leaves :: Trie a -> [a] Source

Return all of the values from a Trie.