pred-trie: Predicative tries

[ bsd3, data, library ] [ Propose Tags ]

Please see the README on Github at https://github.com/athanclark/pred-trie#readme


[Skip to Readme]

Modules

[Last Documentation]

  • Data
    • Trie
      • Data.Trie.Pred
        • Data.Trie.Pred.Base
          • Data.Trie.Pred.Base.Step
        • Data.Trie.Pred.Interface
          • Data.Trie.Pred.Interface.Types

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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, 0.6.1 (info)
Dependencies base (>=4.11 && <5.0), containers, deepseq, hashable, hashtables, mtl, poly-arity (>=0.0.7), pred-set, QuickCheck (>=2.9.2), semigroups, strict, tries (>=0.0.6), 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 2018-11-20T23:35:36Z
Distributions
Reverse Dependencies 2 direct, 1 indirect [details]
Downloads 17543 total (70 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2018-11-21 [all 3 reports]

Readme for pred-trie-0.6.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"