{"id":20225535,"url":"https://github.com/purescript/purescript-record","last_synced_at":"2026-02-13T05:01:55.729Z","repository":{"id":22801491,"uuid":"97350926","full_name":"purescript/purescript-record","owner":"purescript","description":"Functions for working with records and polymorphic labels","archived":false,"fork":false,"pushed_at":"2024-01-06T04:13:13.000Z","size":66,"stargazers_count":68,"open_issues_count":8,"forks_count":32,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-01-29T04:47:32.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PureScript","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/purescript.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}},"created_at":"2017-07-16T00:53:17.000Z","updated_at":"2024-12-21T20:39:10.000Z","dependencies_parsed_at":"2024-01-30T00:09:58.042Z","dependency_job_id":null,"html_url":"https://github.com/purescript/purescript-record","commit_stats":{"total_commits":46,"total_committers":16,"mean_commits":2.875,"dds":0.8478260869565217,"last_synced_commit":"c89cd1ada6b636692571fc374196b1c39c4c9f70"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/purescript/purescript-record","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript%2Fpurescript-record","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript%2Fpurescript-record/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript%2Fpurescript-record/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript%2Fpurescript-record/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purescript","download_url":"https://codeload.github.com/purescript/purescript-record/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript%2Fpurescript-record/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29396847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T04:26:15.637Z","status":"ssl_error","status_checked_at":"2026-02-13T04:16:29.732Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-14T07:13:21.391Z","updated_at":"2026-02-13T05:01:55.713Z","avatar_url":"https://github.com/purescript.png","language":"PureScript","readme":"# purescript-record\n\n[![Latest release](http://img.shields.io/github/release/purescript/purescript-record.svg)](https://github.com/purescript/purescript-record/releases)\n[![Build status](https://github.com/purescript/purescript-record/workflows/CI/badge.svg?branch=master)](https://github.com/purescript/purescript-record/actions?query=workflow%3ACI+branch%3Amaster)\n[![Pursuit](https://pursuit.purescript.org/packages/purescript-record/badge)](https://pursuit.purescript.org/packages/purescript-record)\n\nFunctions for working with records and polymorphic labels\n\n## Installation\n\n```\nspago install record\n```\n\n## Examples\n\nGiven some Symbol (\"type level String\") Proxy and a constrained or concrete record type, you can use this library to generically modify records.\n\n```purs\nx_ = Proxy :: Proxy \"x\"\n\n-- we can get a value out of a field\ngotX :: Int\ngotX = Record.get x_ { x: 1 }\n\n-- we can insert a value into a record that does not have a field at that label yet\ninsertedX :: { x :: Int }\ninsertedX = Record.insert x_ 1 {}\n\n-- we can delete a field from a record at a specific label\ndeletedX :: {}\ndeletedX = Record.delete x_ { x: 1 }\n\n-- we can set a new value for a field\nsetX1 :: { x :: Int }\nsetX1 = Record.set x_ 1 { x: 0 }\n\n-- we can also modify the type of the field by replacing the contents\nsetX2 :: { x :: Unit }\nsetX2 = Record.set x_ unit { x: 0 }\n\n-- we can modify the field value with a function\nmodifyX :: { x :: Int }\nmodifyX = Record.modify x_ (\\value -\u003e value + 1) { x: 0 }\n\n-- we can also merge two records\nmergedXY :: { x :: Int , y :: Int }\nmergedXY = Record.merge { x: 1 } { y: 1 }\n```\n\nSee the [tests](./test/Main.purs) for more examples.\n\nIf you need to combine multiple operations and avoid intermediate values, you might consider using [Record.Builder](https://pursuit.purescript.org/packages/purescript-record/docs/Record.Builder).\n\nYou can also find an explanation and example of how to use this library [in this tutorial](https://purescript-simple-json.readthedocs.io/en/latest/inferred-record-types.html) of the Simple-JSON docs.\n\n## Documentation\n\nModule documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-record).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript%2Fpurescript-record","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurescript%2Fpurescript-record","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript%2Fpurescript-record/lists"}