{"id":20085397,"url":"https://github.com/etorreborre/registry","last_synced_at":"2025-04-04T17:07:14.346Z","repository":{"id":37821105,"uuid":"143853874","full_name":"etorreborre/registry","owner":"etorreborre","description":"Components as records of functions for Haskell","archived":false,"fork":false,"pushed_at":"2025-03-07T09:13:49.000Z","size":725,"stargazers_count":170,"open_issues_count":0,"forks_count":12,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-28T16:06:48.168Z","etag":null,"topics":["dependency-injection","haskell","modules"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etorreborre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"github":["etorreborre"]}},"created_at":"2018-08-07T09:54:27.000Z","updated_at":"2025-03-07T09:13:52.000Z","dependencies_parsed_at":"2025-01-09T17:37:33.845Z","dependency_job_id":"067ede9c-369a-440c-aa6c-7808231013bc","html_url":"https://github.com/etorreborre/registry","commit_stats":{"total_commits":281,"total_committers":6,"mean_commits":"46.833333333333336","dds":"0.16014234875444844","last_synced_commit":"b63cd4e9448c615abd9627927e583e11ebca640e"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etorreborre%2Fregistry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etorreborre%2Fregistry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etorreborre%2Fregistry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etorreborre%2Fregistry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etorreborre","download_url":"https://codeload.github.com/etorreborre/registry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217181,"owners_count":20903009,"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":["dependency-injection","haskell","modules"],"created_at":"2024-11-13T15:55:49.914Z","updated_at":"2025-04-04T17:07:14.326Z","avatar_url":"https://github.com/etorreborre.png","language":"Haskell","funding_links":["https://github.com/sponsors/etorreborre"],"categories":[],"sub_categories":[],"readme":"# Registry [![Hackage](https://img.shields.io/hackage/v/registry.svg)](https://hackage.haskell.org/package/registry) [![Build Status](https://github.com/etorreborre/registry/workflows/ci/badge.svg)](https://github.com/etorreborre/registry/actions)\n\n##### *It's functions all the way down* \u003cimg src=\"https://raw.githubusercontent.com/etorreborre/registry/main/doc/images/unboxed-bottomup.jpg\" border=\"0\"/\u003e\n\n#### Presentation\n\nThis library provides a data structure, a \"Registry\", to control the creation of functions from other functions. You can use this technique to:\n\n - create applications out of software components (\"dependency injection\")\n - fine tune encoders/decoders (see the [`registry-aeson`][registry-aeson] and the [`registry-messagepack`][registry-messagepack] projects)\n - create composable data generators for nested datatypes (see the [`registry-hedgehog`][registry-hedgehog] and the [`registry-hedgehog-aeson`][registry-hedgehog-aeson] projects)\n\nYou can watch a video presenting the main ideas behind the library [here](https://www.youtube.com/watch?v=xKgII4ggo-4).\n\nThe following sections introduce in more details the problem that this library is addressing, the concepts behind the solution and various use-cases which can arise on real projects:\n\n 1. [what is the problem?][motivation]\n 2. the concept of a [Registry][registry] and the resolution algorithm\n 3. how does this [compare to monad transformers and effects](https://github.com/etorreborre/effects)?\n\n#### Tutorials\n\n 1. tutorial: use a `Registry` to create [applications][tutorial] and define components\n 1. use a `Registry` to compose [Hedgehog generators][generators]\n 1. [workshop][workshop]: implement your own simplified registry and understand the basic concepts behind it\n\n#### How-tos\n\n 1. how to [install this library][install]?\n 1. how to do [mocking][mocking]?\n 1. how to [specialize some values in some contexts][specialize]?\n 1. how to [control effects][caching] occurring when creating a component (like a connection pool)?\n 1. how to [allocate resources][resources] which must be finalized?\n 1. how to [extract a dot graph from the registry][dot] in an application?\n 1. how to [interact with a library using monad transformers](https://github.com/etorreborre/registry/blob/master/test/Test/Data/Registry/MonadRandomSpec.hs)?\n 1. how to [remove boilerplate][boilerplate] due to parameter passing?\n 1. how to [create a typeclass from a record of functions][typeclass]?\n 1. how to [read type errors][errors]?\n\n#### Reference guides\n\n 1. [main operators and functions][reference]\n 1. [implementation notes][implementation]\n\n\n[motivation]: http://github.com/etorreborre/registry/blob/main/doc/motivation.md\n[registry]: http://github.com/etorreborre/registry/blob/main/doc/registry.md\n[tutorial]: http://github.com/etorreborre/registry/blob/main/doc/tutorial.md\n[applications]: http://github.com/etorreborre/registry/blob/main/doc/applications.md\n[mocking]: http://github.com/etorreborre/registry/blob/main/doc/applications.md#integration\n[install]: http://github.com/etorreborre/registry/blob/main/doc/install.md\n[specialize]: http://github.com/etorreborre/registry/blob/main/doc/applications.md#context-dependent-configurations\n[caching]: http://github.com/etorreborre/registry/blob/main/doc/applications.md#caching\n[resources]: http://github.com/etorreborre/registry/blob/main/doc/applications.md#resources\n[dot]: http://github.com/etorreborre/registry/blob/main/doc/dot.md\n[boilerplate]: http://github.com/etorreborre/registry/blob/main/doc/boilerplate.md\n[typeclass]: http://github.com/etorreborre/registry/blob/main/doc/typeclass.md\n[generators]: http://github.com/etorreborre/registry-hedgehog/blob/main/doc/tutorial.md\n[registry-hedgehog]: http://github.com/etorreborre/registry-hedgehog\n[registry-messagepack]: http://github.com/etorreborre/registry-messagepack\n[registry-aeson]: http://github.com/etorreborre/registry-aeson\n[registry-hedgehog-aeson]: http://github.com/etorreborre/registry-hedgehog-aeson\n[reference]: http://github.com/etorreborre/registry/blob/main/doc/reference.md\n[implementation]: http://github.com/etorreborre/registry/blob/main/doc/implementation.md\n[errors]: http://github.com/etorreborre/registry/blob/main/doc/errors.md\n[workshop]: https://github.com/etorreborre/registry-workshop\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetorreborre%2Fregistry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetorreborre%2Fregistry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetorreborre%2Fregistry/lists"}