Popularity
2.9
Growing
Activity
0.0
Stable
5
2
0
Monthly Downloads: 47
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.6.1
Add another 'pred' Package
README
pred-trie
A predicative trie library - use predicates instead of literal match to capture classes of results, instead of enumerating distinguished ones.
Usage
The predicates are existentially quantified such that a predicate creates an unknown type, while it's result must have the necessary arity, matching the quantified type, to fulfill the lookup:
PredTrie s a
= PNil
| forall t. PCons
{ predicate :: s -> Maybe t
, result :: t -> a
}
...basically.
I broke the lookup phases into "steps", like the tries
package, and used the fastest-lookup HashMapStep
trie implementation for the
literal lookups. For more info, read the code :D
How to run tests
stack test
Benchmarking
stack bench --benchmark-arguments="--output profile.html"