{"id":16336407,"url":"https://github.com/justinwoo/purescript-puchitomato","last_synced_at":"2026-02-18T13:02:04.350Z","repository":{"id":58230875,"uuid":"141637248","full_name":"justinwoo/purescript-puchitomato","owner":"justinwoo","description":"A small module for a string literal type that guarantees a String value the same as its Symbol parameter.","archived":false,"fork":false,"pushed_at":"2018-07-19T22:36:31.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T11:39:39.131Z","etag":null,"topics":["purescript"],"latest_commit_sha":null,"homepage":"","language":"PureScript","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/justinwoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-19T22:35:50.000Z","updated_at":"2018-07-20T05:00:54.000Z","dependencies_parsed_at":"2022-08-30T20:01:42.610Z","dependency_job_id":null,"html_url":"https://github.com/justinwoo/purescript-puchitomato","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/justinwoo/purescript-puchitomato","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-puchitomato","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-puchitomato/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-puchitomato/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-puchitomato/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinwoo","download_url":"https://codeload.github.com/justinwoo/purescript-puchitomato/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-puchitomato/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019060,"owners_count":26086517,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["purescript"],"created_at":"2024-10-10T23:44:02.537Z","updated_at":"2025-10-14T11:39:39.510Z","avatar_url":"https://github.com/justinwoo.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Purescript-PuchiTomato\n\nA small module for a string literal type that guarantees a `String` value the same as its `Symbol` parameter.\n\n![](https://i.imgur.com/NkDWYEv.jpg)\n\n## Usage\n\n```purs\nappleP = TP.SProxy :: TP.SProxy \"apple\"\n\ntype AppleSL = PT.StringLiteral \"apple\"\n\nappleSL :: AppleSL\nappleSL = PT.mkStringLiteral appleP\n\nmain = do\n  let (res1 :: JSON.E AppleSL) = JSON.readJSON \"\\\"apple\\\"\"\n  assert (isRight res1)\n\n  let (res2 :: JSON.E AppleSL) = JSON.readJSON \"\\\"apples\\\"\"\n  assert (isLeft res2)\n\n  assert (JSON.writeJSON appleSL == \"\\\"apple\\\"\")\n\n  assert (PT.extractString appleSL == \"apple\")\n\n  assert (show appleSL == \"apple\")\n\n  let (res4 :: Maybe AppleSL) = PT.parseStringLiteral \"apple\"\n  assert (isJust res4)\n\n  let (res5 :: Maybe AppleSL) = PT.parseStringLiteral \"apples\"\n  assert (isNothing res5)\n```\n\nSee the [API Docs](https://pursuit.purescript.org/packages/purescript-puchitomato/) or the [tests](test/Main.purs) for usage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-puchitomato","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinwoo%2Fpurescript-puchitomato","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-puchitomato/lists"}