{"id":15467498,"url":"https://github.com/matheus23/dhall-blocks","last_synced_at":"2025-10-09T03:07:32.106Z","repository":{"id":145119385,"uuid":"224154096","full_name":"matheus23/dhall-blocks","owner":"matheus23","description":"More configureable dhall utility than Prelude/JSON/renderYAML and its internal Blocks structures.","archived":false,"fork":false,"pushed_at":"2019-11-26T09:43:06.000Z","size":4,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-09T03:03:18.685Z","etag":null,"topics":["dhall","yaml"],"latest_commit_sha":null,"homepage":null,"language":"Dhall","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/matheus23.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":"2019-11-26T09:36:31.000Z","updated_at":"2020-03-11T19:39:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"d1416e22-fbf9-47ec-a4db-5d1639673741","html_url":"https://github.com/matheus23/dhall-blocks","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"54c6d297b5ad9b5591fcff2709afe9b07f2fffc0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matheus23/dhall-blocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheus23%2Fdhall-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheus23%2Fdhall-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheus23%2Fdhall-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheus23%2Fdhall-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matheus23","download_url":"https://codeload.github.com/matheus23/dhall-blocks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheus23%2Fdhall-blocks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000775,"owners_count":26082911,"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-09T02:00:07.460Z","response_time":59,"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":["dhall","yaml"],"created_at":"2024-10-02T01:22:24.636Z","updated_at":"2025-10-09T03:07:32.081Z","avatar_url":"https://github.com/matheus23.png","language":"Dhall","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dhall-blocks\n\nThis utility grew out of the `JSON.renderYAML` function from the [Dhall Prelude](https://github.com/dhall-lang/dhall-lang/blob/master/Prelude/JSON/renderYAML).\n\nI wanted the `Block` abstraction for building indentable text blocks to be accessible for anyone who wants to use it. In the Prelude it is hidden inside the `renderYAML` scope.\n\nI also wanted more configurability for the `renderYAML` function, as there is quite a design space for different solutions.\n\nOther features include:\n* Being able to configure how yaml key escaping should work\n* Inspecting the result of `renderYAML` as it returns a `Block` (instead of `Text` as in the Prelude's renderYAML).\n\n## Usage\n\n```dhall\nlet JSON =\n      https://prelude.dhall-lang.org/JSON/package.dhall sha256:0c3c40a63108f2e6ad59f23b789c18eb484d0e9aebc9416c5a4f338c6753084b\n\nlet Block =\n      https://raw.githubusercontent.com/matheus23/dhall-blocks/master/src/Blocks/package.dhall sha256:bd8661ca59f750dfa5a64bee2ab3c9e9c3f9690fb89a1666e3466d58863b29c0\n\nlet renderYAML =\n      https://raw.githubusercontent.com/matheus23/dhall-blocks/master/src/Blocks/renderYAML.dhall sha256:3d0f379ea787cde8d2befd4a25486e88c62476d5dc6c62d3f51d6e2567d4a3f9\n\nin  Block.toText\n      ( renderYAML\n          Text/show -- Configure your own key escaping using this function\n          ( JSON.array\n              [ JSON.bool True\n              , JSON.string \"Hello\"\n              , JSON.object\n                  [ { mapKey = \"foo\", mapValue = JSON.null }\n                  , { mapKey = \"bar\", mapValue = JSON.number 1.0 }\n                  ]\n              ]\n          )\n      )\n```\n\nAbove dhall expression results in the following text output (using `dhall text --file `[`Example.dhall`](./Example.dhall))\n\n```yaml\n- true\n- \"Hello\"\n- \"foo\": null\n  \"bar\": 1.0\n```\n\n## Planned Features\n\nI was planning on adding rendering YAML comments, but didn't get around designing the appropriate abstraction for that, yet. If you have any ideas/usecases, please let me know in an issue on this repository!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheus23%2Fdhall-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatheus23%2Fdhall-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheus23%2Fdhall-blocks/lists"}