{"id":19517309,"url":"https://github.com/athanclark/pred-trie","last_synced_at":"2025-04-26T06:31:18.150Z","repository":{"id":30591226,"uuid":"34146353","full_name":"athanclark/pred-trie","owner":"athanclark","description":"predicative lookup container","archived":false,"fork":false,"pushed_at":"2018-11-20T23:35:29.000Z","size":1674,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T08:40:15.700Z","etag":null,"topics":["haskell","lookup","parametric-polymorphism","predicates","trie"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/athanclark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-18T00:28:02.000Z","updated_at":"2021-07-11T21:48:32.000Z","dependencies_parsed_at":"2022-07-19T23:49:51.609Z","dependency_job_id":null,"html_url":"https://github.com/athanclark/pred-trie","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fpred-trie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fpred-trie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fpred-trie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fpred-trie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athanclark","download_url":"https://codeload.github.com/athanclark/pred-trie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250944095,"owners_count":21511692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["haskell","lookup","parametric-polymorphism","predicates","trie"],"created_at":"2024-11-11T00:01:44.235Z","updated_at":"2025-04-26T06:31:17.527Z","avatar_url":"https://github.com/athanclark.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"pred-trie\n=========\n\nA predicative trie library - use predicates instead of literal match to capture\nclasses of results, instead of enumerating distinguished ones.\n\n## Usage\n\nThe predicates are existentially quantified such that a predicate _creates_ an\nunknown type, while it's result must have the _necessary arity_, matching the\nquantified type, to fulfill the lookup:\n\n```haskell\nPredTrie s a\n  = PNil\n  | forall t. PCons\n      { predicate :: s -\u003e Maybe t\n      , result    :: t -\u003e a\n      }\n```\n\n...basically.\n\nI broke the lookup phases into \"steps\", like the [tries](https://github.com/athanclark/tries)\npackage, and used the fastest-lookup `HashMapStep` trie implementation for the\nliteral lookups. For more info, read the code :D\n\n## How to run tests\n\n```bash\nstack test\n```\n\n## Benchmarking\n\n```bash\nstack bench --benchmark-arguments=\"--output profile.html\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Fpred-trie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathanclark%2Fpred-trie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Fpred-trie/lists"}