{"id":17537643,"url":"https://github.com/zenhack/haskell-quota","last_synced_at":"2025-03-29T03:46:11.928Z","repository":{"id":151019406,"uuid":"73233783","full_name":"zenhack/haskell-quota","owner":"zenhack","description":"Haskell library for tracking quota usage","archived":false,"fork":false,"pushed_at":"2018-10-04T19:46:42.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T13:45:04.024Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zenhack.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-08T22:44:12.000Z","updated_at":"2018-10-04T19:46:43.000Z","dependencies_parsed_at":"2023-05-02T16:31:12.066Z","dependency_job_id":null,"html_url":"https://github.com/zenhack/haskell-quota","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/zenhack%2Fhaskell-quota","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Fhaskell-quota/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Fhaskell-quota/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Fhaskell-quota/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenhack","download_url":"https://codeload.github.com/zenhack/haskell-quota/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246135739,"owners_count":20729056,"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":[],"created_at":"2024-10-20T20:42:22.544Z","updated_at":"2025-03-29T03:46:11.906Z","avatar_url":"https://github.com/zenhack.png","language":"Haskell","readme":"**Unmaintained**. This package was originally written for use with [haskell-capnp][1],\nbut the relevant functionality [has been folded into that package][2], so this is no\nlonger used.\n\nHaskell library to track quota usage.\n\n# Why\n\nSometimes you need to process untrusted inputs in a way which if done\nnaively could consume unacceptably large amounts of resources. In this\ncase, you need a way to track and limit the resource usage.\n\n# What\n\nThe core of the library is a type class, `MonadQuota`:\n\n```haskell\nclass MonadQuota m where\n    invoice :: Int -\u003e m ()\n````\n\n...and a monad transformer `QuotaT`, which implements MonadQuota on\ntop of MonadThrow.\n\nThe QuotaT keeps track of a quota, calling `throwM QuotaError` if it is\nexpended. `invoice` deducts its argument from the quota.\n\nThis was originally developed for use with [haskell-capnp][1], which\nneeds to deal with inputs where naive traversal could cause a DoS\nvulnerability.\n\n# License\n\nApache 2.0\n\n[1]: https://github.com/zenhack/haskell-capnp\n[2]: http://hackage.haskell.org/package/capnp-0.3.0.0/docs/Data-Capnp-TraversalLimit.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenhack%2Fhaskell-quota","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenhack%2Fhaskell-quota","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenhack%2Fhaskell-quota/lists"}