{"id":16336436,"url":"https://github.com/justinwoo/purescript-tortellini","last_synced_at":"2026-02-10T03:31:26.714Z","repository":{"id":58222679,"uuid":"115268851","full_name":"justinwoo/purescript-tortellini","owner":"justinwoo","description":"An easy ini library for PureScript","archived":false,"fork":false,"pushed_at":"2019-04-25T02:41:02.000Z","size":18,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-20T06:28:59.506Z","etag":null,"topics":["ini","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":"2017-12-24T14:41:45.000Z","updated_at":"2019-04-25T02:41:04.000Z","dependencies_parsed_at":"2022-08-31T03:00:39.167Z","dependency_job_id":null,"html_url":"https://github.com/justinwoo/purescript-tortellini","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/justinwoo/purescript-tortellini","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-tortellini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-tortellini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-tortellini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-tortellini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinwoo","download_url":"https://codeload.github.com/justinwoo/purescript-tortellini/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-tortellini/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29289902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T02:32:08.756Z","status":"ssl_error","status_checked_at":"2026-02-10T02:30:31.937Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["ini","purescript"],"created_at":"2024-10-10T23:44:08.155Z","updated_at":"2026-02-10T03:31:26.696Z","avatar_url":"https://github.com/justinwoo.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PureScript-Tortellini\n\n[![Build Status](https://travis-ci.org/justinwoo/purescript-tortellini.svg?branch=master)](https://travis-ci.org/justinwoo/purescript-tortellini)\n\nA library for writing and reading from ini files.\n\n*Disclaimer:* this library does not aim to provide flexible ini support. Only what's easy.\n\n## Assumptions\n\nThe main way I work with ini files is to declare that the top level must be a record, with each section header being a label and the section body being a record type at that field.\n\nEach section is then a record of the values, where `key=value` with no spaces, with the following representations:\n\n* Boolean: true or false, unquoted\n* Int: 1 as the number not wrapped in anything\n* String: string, unquoted\n* Array: members represented as their types, with a comma delimiter\n\n## Tl;dr\n\n```hs\ntestDoc :: String\ntestDoc = \"\"\"\n[section1]\nfruit=apple\nisRed=true\nseeds=4\nchildren=banana,grape,pineapple\n[section2]\nbat=grey\n[WOWSECTION]\n[麻婆豆腐]\n\"\"\"\n\ntype TestIni =\n  { section1 ::\n       { fruit :: String\n       , isRed :: Boolean\n       , seeds :: Int\n       , children :: Array String\n       }\n  , section2 ::\n       { bat :: String\n       }\n  , \"WOWSECTION\" ::\n       {}\n  , \"麻婆豆腐\" ::\n       {}\n  }\n  \n-- ...\n  suite \"parsellIni\" do\n    test \"works\" do\n      case parsellIni testDoc of\n        Left e -\u003e failure $ show e\n        Right (result :: TestIni) -\u003e do\n          equal result.section1.fruit \"apple\"\n          equal result.section1.isRed true\n          equal result.section1.seeds 4\n          equal result.section1.children [\"banana\",\"grape\",\"pineapple\"]\n          equal result.section2.bat \"grey\"\n```\n\n## Extra notes\n\nThings someone might add if they really want it:\n\n* Nullary Sum to String generic to work with enumerable values\n    * Do you really need this though?...\n* Escaping characters\n* Multiline escaping\n* Whatever other \"nice to have\" features\n\nThings that I won't support unless someone has a good idea:\n\n* Records nested in sections. Who wants this anyway?\n* Nested arrays. What even?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-tortellini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinwoo%2Fpurescript-tortellini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-tortellini/lists"}