{"id":16337025,"url":"https://github.com/justinwoo/purescript-chahan","last_synced_at":"2026-01-25T17:32:59.226Z","repository":{"id":149405703,"uuid":"130123912","full_name":"justinwoo/purescript-chahan","owner":"justinwoo","description":" Turn your Generics-Rep Sums and Products into lists, because that's cool.","archived":false,"fork":false,"pushed_at":"2018-04-21T14:55:07.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-16T15:50:26.120Z","etag":null,"topics":["generics-rep","purescript","type-level"],"latest_commit_sha":null,"homepage":"","language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justinwoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-04-18T21:27:51.000Z","updated_at":"2019-09-12T07:44:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e97be4e-cb7a-47cc-9446-ce99eb4f4a42","html_url":"https://github.com/justinwoo/purescript-chahan","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justinwoo/purescript-chahan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-chahan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-chahan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-chahan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-chahan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinwoo","download_url":"https://codeload.github.com/justinwoo/purescript-chahan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-chahan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28755940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: 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":["generics-rep","purescript","type-level"],"created_at":"2024-10-10T23:45:39.005Z","updated_at":"2026-01-25T17:32:59.196Z","avatar_url":"https://github.com/justinwoo.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PureScript-Chahan\n\nTurn your Generics-Rep Sums and Products into lists, because that's cool.\n\n![](https://i.imgur.com/xd77crJ.jpg)\n\n## Usage\n\nSee \u003ctest/Main.purs\u003e\n\n```hs\nclass SumNames (list :: SumList1) where\n  sumNames :: SLProxy list -\u003e NonEmptyList String\n\n-- ...\n\ndata Fruit\n  = Apple\n  | Banana\n  | Cherry\nderive instance genericFruit :: Generic Fruit _\n\navailableFruits\n  :: forall rep list\n   . Generic Fruit rep\n  =\u003e SumToList rep list\n  =\u003e SumNames list\n  =\u003e NonEmptyList String\navailableFruits = sumNames (SLProxy :: SLProxy list)\n\ndata Thing\n  = Thing Int String Int\nderive instance genericThing :: Generic Thing _\n\nthingNames\n  :: forall rep name list\n   . Generic Thing rep\n  =\u003e ToProductList rep name list\n  =\u003e IsSymbol name\n  =\u003e ProductNames list\n  =\u003e NonEmptyList String\nthingNames =\n  head \u003c\u003e productNames (PLProxy :: PLProxy list)\n  where\n    head = pure $ reflectSymbol (SProxy :: SProxy name)\n\n-- ...\n    test \"SumToList works\" do\n      Assert.equal\n        \"Apple, Banana, Cherry\"\n        (intercalate \", \" availableFruits)\n\n    test \"ToProductList/ProductToList works\" do\n      Assert.equal\n        \"Thing Int String Int\"\n        (intercalate \" \" thingNames)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-chahan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinwoo%2Fpurescript-chahan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-chahan/lists"}