{"id":13681857,"url":"https://github.com/kowainik/idris-patricia","last_synced_at":"2025-04-30T06:32:32.214Z","repository":{"id":91183641,"uuid":"106704467","full_name":"kowainik/idris-patricia","owner":"kowainik","description":"🌋 Idris implementation of patricia tree","archived":false,"fork":false,"pushed_at":"2020-11-06T17:55:51.000Z","size":16,"stargazers_count":22,"open_issues_count":7,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-08-02T13:33:04.616Z","etag":null,"topics":["algorithm","containers","data-structure","idris","persistence"],"latest_commit_sha":null,"homepage":"https://kowainik.github.io/projects/idris-patricia","language":"Idris","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kowainik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"ko_fi":"kowainik","github":["vrom911"]}},"created_at":"2017-10-12T14:35:18.000Z","updated_at":"2023-12-18T21:27:51.000Z","dependencies_parsed_at":"2024-01-14T15:55:46.873Z","dependency_job_id":null,"html_url":"https://github.com/kowainik/idris-patricia","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kowainik%2Fidris-patricia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kowainik%2Fidris-patricia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kowainik%2Fidris-patricia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kowainik%2Fidris-patricia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kowainik","download_url":"https://codeload.github.com/kowainik/idris-patricia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224201759,"owners_count":17272635,"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":["algorithm","containers","data-structure","idris","persistence"],"created_at":"2024-08-02T13:01:36.971Z","updated_at":"2024-11-12T01:30:37.118Z","avatar_url":"https://github.com/kowainik.png","language":"Idris","funding_links":["https://ko-fi.com/kowainik","https://github.com/sponsors/vrom911"],"categories":["Idris"],"sub_categories":[],"readme":"# idris-patricia\n\n[![Build status](https://secure.travis-ci.org/kowainik/idris-patricia.svg)](http://travis-ci.org/kowainik/idris-patricia)\n[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nThis package implements map from integer key to values. Data structure can be used as persistent array. Implementation is based on article about patricia trees and on [existing Haskell implementation](https://hackage.haskell.org/package/containers-0.5.10.2/docs/Data-IntMap-Lazy.html) from [`containers`](http://hackage.haskell.org/package/containers) package. Dependent types can help to ensure some invariants for data structure.\n\n## REPL examples\n\n```idris\nλΠ\u003e the (Int32Map String) $ insert 3 \"a\" Empty\nLeaf (MkBits 3) \"a\" : IntBitMap 32 String\n\nλΠ\u003e the (Int32Map String) $ delete 3 $ insert 3 \"a\" Empty\nEmpty : IntBitMap 32 String\n\nλΠ\u003e the (Int32Map String) $ insert 2 \"c\" $ insert 4 \"b\" $ insert 3 \"a\" Empty\nBin (MkBits 3)\n    (FS (FS FZ))\n    (Bin (MkBits 2) FZ (Leaf (MkBits 2) \"c\") (Leaf (MkBits 3) \"a\"))\n    (Leaf (MkBits 4) \"b\") : IntBitMap 32 String\n\nλΠ\u003e toList $ the (IntBitMap 32 String) $ insert 2 \"c\" $ insert 4 \"b\" $ insert 3 \"a\" Empty\n[\"c\", \"a\", \"b\"] : List String\n```\n\n## How to build\n\n### Nix\n\nJust run this command to build project and run tests.\n\n```bash\nnix-shell -A idris-patricia --command \"bash install-dependencies.sh \u0026\u0026 idris --testpkg patricia-nix.ipkg --idrispath dependencies/specdris/src\"\n```\n\n### No-Nix\n\n1. Install [`specdris`](https://github.com/pheymann/specdris) following instructions from repository.\n2. Run `idris --testpkg patricia.ipkg`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkowainik%2Fidris-patricia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkowainik%2Fidris-patricia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkowainik%2Fidris-patricia/lists"}