{"id":17810392,"url":"https://github.com/sigma-andex/purescript-morello","last_synced_at":"2026-01-16T00:24:50.319Z","repository":{"id":41969394,"uuid":"338595406","full_name":"sigma-andex/purescript-morello","owner":"sigma-andex","description":"Cherry-picking 🍒 for your data","archived":false,"fork":false,"pushed_at":"2022-11-08T14:54:12.000Z","size":145,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-21T19:02:58.556Z","etag":null,"topics":["data-transformation","data-validation","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-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sigma-andex.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":"2021-02-13T14:43:22.000Z","updated_at":"2025-01-17T10:22:23.000Z","dependencies_parsed_at":"2023-01-21T16:02:39.484Z","dependency_job_id":null,"html_url":"https://github.com/sigma-andex/purescript-morello","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/sigma-andex/purescript-morello","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-andex%2Fpurescript-morello","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-andex%2Fpurescript-morello/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-andex%2Fpurescript-morello/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-andex%2Fpurescript-morello/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigma-andex","download_url":"https://codeload.github.com/sigma-andex/purescript-morello/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigma-andex%2Fpurescript-morello/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28474502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T00:15:39.755Z","status":"ssl_error","status_checked_at":"2026-01-16T00:15:32.174Z","response_time":62,"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":["data-transformation","data-validation","purescript"],"created_at":"2024-10-27T15:33:14.800Z","updated_at":"2026-01-16T00:24:50.301Z","avatar_url":"https://github.com/sigma-andex.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# purescript-morello 🌸\n\nA purescript library for cherry-picking 🍒 your data.\n\n*Ehh, wat ?*\n\nMorello is a library for making data transformation and validation super simple.\n\n## tl;dr \nTransform \u0026 validate your input data in a declarative way.\n\n```purescript\nimport Morello.Morello\n\n-- Given an input model...\ntype PersonInput = { profession :: { title :: String, salary :: Number } }\n\n-- ...and an output model...\ntype PersonOutput = { details :: { title :: Title, salary :: Salary, jobType :: JobType } }\n\n-- ...write some validators...\nvalidateTitle :: Validate String Title\nvalidateTitle \"Software Engineer\" = invalid (FieldInvalid \"Software Engineering is not a serious profession\")\nvalidateTitle s = valid (Title s)\n\nvalidateSalary :: Validate Number Salary\nvalidateSalary n \n    | n \u003e 50000.0 = valid (Salary n)\nvalidateSalary n = invalid (FieldInvalid \"Salary is too damn low\")\n\n-- ...and create a conversion in a declarative way.. \nconvert :: PersonInput -\u003e Validated PersonOutput\nconvert =\n  branch \n    \u003e\u003e\u003e cherry { \n            -- ...by defining how your output data will look like...\n            details : { \n                title: \n                    -- ...picking data from the input record using a lens... \n                    pick' (key :: _ \"profession.title\") validateTitle :: Pick PersonInput Title\n              , salary:\n                    -- ...and validating it using validators.\n                    pick' (key :: _ \"profession.salary\") validateSalary :: Pick PersonInput Salary\n              , jobType : Worker\n            }\n        }\n    \u003e\u003e\u003e blossom\n```\n\n## Features\n\n- 📜 **Declarative data conversion:** Define how your output data should look like instead of how to transform the input data\n- 🎒 **Applicative error accumulation:** Morello collects all validation erros instead of failing on the first error\n- 🪢 **Fully composable**: Cherries are just functions and therefore compose\n- 🔭 **Lens support**: Use [`lenses`](https://github.com/purescript-contrib/purescript-profunctor-lenses) to zoom into your input data\n- 🗺️ **Unicode support**: Define branches 🌱, cherries 🍒 and blossoms 🌸 using unicode\n\n## Installation\n\n```bash\nspago install morello\n```\n\n## Quick start\n\nSee [MinimalSpec](./test/Morello/Morello/MinimalSpec.purs) for a short example that illustrates the basic functionality. \n\n## Usage \n\nSee [usage guide](./docs/usage-guide.md)\n\n## Contributing\n\nContributions via issues \u0026 PRs are very welcome.\n\n## Acknowledgements \n\nThis work is merely connecting the dots of the amazing Purescript language and its awesome ecosystem. A special shout-out to the contributors \u0026 maintainers of the [`profunctor-lenses`](https://github.com/purescript-contrib/purescript-profunctor-lenses), [`heterogeneous`](https://github.com/natefaubion/purescript-heterogeneous/) and [`validation`](https://github.com/purescript/purescript-validation) libraries. This library wouldn't have been possible without these.\n\n## License \n\nLicensed under [MIT-0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigma-andex%2Fpurescript-morello","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigma-andex%2Fpurescript-morello","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigma-andex%2Fpurescript-morello/lists"}