pred-trie: Predicative tries

[ bsd3, data, library ] [ Propose Tags ]

Please see the README on Github at https://git.localcooking.com/tooling/pred-trie#readme


[Skip to Readme]
Versions 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.6.1, 0.0.7, 0.0.7.1, 0.0.8, 0.0.8.1, 0.0.9, 0.0.10, 0.0.10.1, 0.0.10.2, 0.0.11, 0.0.12, 0.1, 0.2.0, 0.2.1, 0.2.3, 0.2.4, 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.5.1.1, 0.5.1.2, 0.6.0, 0.6.0.1 (info)
Dependencies base (>=4.8 && <5.0), containers, deepseq, hashable, hashtables, mtl, poly-arity (>=0.0.7), pred-set, QuickCheck (>=2.9.2), semigroups, strict, tries (>=0.0.5), unordered-containers [details]
License BSD-3-Clause
Copyright 2018 Athan Clark
Author Athan Clark
Maintainer athan.clark@localcooking.com
Category Data
Home page https://github.com/athanclark/pred-trie#readme
Bug tracker https://github.com/athanclark/pred-trie/issues
Source repo head: git clone https://github.com/athanclark/pred-trie
Uploaded by athanclark at Sat Mar 17 16:20:20 UTC 2018
Distributions NixOS:0.6.0.1
Downloads 8681 total (76 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-03-17 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for pred-trie-0.6.0.1

[back to package description]

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"