cryptol-2.10.0: Cryptol: The Language of Cryptography
Copyright(c) 2013-2016 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Instances details
Show a => Show (Trie a) Source # 
Instance details

Defined in Cryptol.REPL.Trie

Methods

showsPrec :: Int -> Trie a -> ShowS #

show :: Trie a -> String #

showList :: [Trie a] -> ShowS #

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.