{"id":22836551,"url":"https://github.com/j-mie6/parsley-cats","last_synced_at":"2025-10-03T14:14:02.983Z","repository":{"id":65106884,"uuid":"509977290","full_name":"j-mie6/parsley-cats","owner":"j-mie6","description":"Typeclass instances for `parsley` to make it compatible with `cats`","archived":false,"fork":false,"pushed_at":"2025-02-18T10:34:59.000Z","size":112,"stargazers_count":11,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T03:32:00.222Z","etag":null,"topics":["cats","parser","parser-combinators","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j-mie6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2022-07-03T09:27:28.000Z","updated_at":"2025-02-27T08:12:19.000Z","dependencies_parsed_at":"2024-12-12T23:11:37.319Z","dependency_job_id":"4a267103-8ca0-4f92-a5aa-e0c182d71382","html_url":"https://github.com/j-mie6/parsley-cats","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/j-mie6/parsley-cats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mie6%2Fparsley-cats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mie6%2Fparsley-cats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mie6%2Fparsley-cats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mie6%2Fparsley-cats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j-mie6","download_url":"https://codeload.github.com/j-mie6/parsley-cats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-mie6%2Fparsley-cats/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260690833,"owners_count":23047099,"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","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":["cats","parser","parser-combinators","scala"],"created_at":"2024-12-12T23:11:34.517Z","updated_at":"2025-10-03T14:13:57.942Z","avatar_url":"https://github.com/j-mie6.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parsley Cats ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/j-mie6/parsley-cats/ci.yml?branch=master) [![parsley-cats Scala version support](https://index.scala-lang.org/j-mie6/parsley-cats/parsley-cats/latest.svg)](https://index.scala-lang.org/j-mie6/parsley-cats/parsley-cats) [![GitHub license](https://img.shields.io/github/license/j-mie6/parsley-cats.svg)](https://github.com/j-mie6/parsley-cats/blob/master/LICENSE) ![GitHub commits since latest release (by SemVer)](https://img.shields.io/github/commits-since/j-mie6/parsley-cats/latest) ![Code of Conduct](https://img.shields.io/badge/Code%20of%20Conduct-Scala-blue.svg) [![Badge-Scaladoc]][Link-Scaladoc] ![Typelevel Affiliate Project](https://img.shields.io/badge/typelevel-affiliate%20project-FFB4B5.svg) \u003ca href=\"https://typelevel.org/cats/\"\u003e\u003cimg src=\"https://typelevel.org/cats/img/cats-badge.svg\" height=\"60px\" align=\"right\" alt=\"Cats friendly\" /\u003e\u003c/a\u003e\n\n## What is `parsley-cats`?\nThe `parsley-cats` library exposes `cats` instances for `MonoidK[Parsley]`, `Monad[Parsley]`, and `FunctorFilter[Parsley]` as well as `Defer[Parsley]`.\nCare should still be taken to not define truly recursive parsers using the `cats` API (although monadic parser with `flatMap`\nmay be generally recursive, just slow). In particular, make use of `Defer[Parsley].fix`\nto handle recursion, or plain `lazy val` based construction (as in regular `parsley` use).\n\nIt also includes helpful combinators to integrate with `cats` abstractions, like non-empty datastructures\nand `Monoid`/`Semigroup`.\n\n## How do I use it? [![parsley-cats Scala version support](https://index.scala-lang.org/j-mie6/parsley-cats/parsley-cats/latest-by-scala-version.svg?platform=jvm)](https://index.scala-lang.org/j-mie6/parsley-cats/parsley-cats) [![parsley-cats Scala version support](https://index.scala-lang.org/j-mie6/parsley-cats/parsley-cats/latest-by-scala-version.svg?platform=sjs1)](https://index.scala-lang.org/j-mie6/parsley-cats/parsley-cats) [![parsley-cats Scala version support](https://index.scala-lang.org/j-mie6/parsley-cats/parsley-cats/latest-by-scala-version.svg?platform=native0.4)](https://index.scala-lang.org/j-mie6/parsley-cats/parsley-cats)\n\nParsley cats is distributed on Maven Central, and can be added to your project via:\n\n```scala\nlibraryDependencies += \"com.github.j-mie6\" %% \"parsley-cats\" % \"1.5.0\"\n```\n\nit requires `parsley` and `cats-core` to also be dependencies of your project. The current version\nmatrix for `parsley-cats`:\n\n| `parsley-cats` version | `parsley` version | `cats-core` version |\n| :--------------------: | :---------------: | :-----------------: |\n| `0.1.x`                | `\u003e= 4 \u0026\u0026 \u003c 5`     | `\u003e= 2.8 \u0026\u0026 \u003c 3`     |\n| `0.2.x`                | `\u003e= 4 \u0026\u0026 \u003c 5`     | `\u003e= 2.8 \u0026\u0026 \u003c 3`     |\n| `1.0.x`                | `\u003e= 4 \u0026\u0026 \u003c 5`     | `\u003e= 2.8 \u0026\u0026 \u003c 3`     |\n| `1.1.x`                | `\u003e= 4 \u0026\u0026 \u003c 5`     | `\u003e= 2.8 \u0026\u0026 \u003c 3`     |\n| `1.2.x`                | `\u003e= 4 \u0026\u0026 \u003c 5`     | `\u003e= 2.8 \u0026\u0026 \u003c 3`     |\n| `1.3.x`                | `\u003e= 4.5 \u0026\u0026 \u003c=5`*  | `\u003e= 2.8 \u0026\u0026 \u003c 3`     |\n| `1.4.x`                | `\u003e= 4.5 \u0026\u0026 \u003c=5`*  | `\u003e= 2.8 \u0026\u0026 \u003c 3`     |\n| `1.5.x`                | `\u003e= 4.6 \u0026\u0026 \u003c=5`*  | `\u003e= 2.12 \u0026\u0026 \u003c 3`    |\n\n_(* `parsley-5.x` compatibility is not gauranteed, but is likely to still work, please report any issues)_\n\nTo make use of your favourite `cats` syntax, you'll want the following imports:\n\n```scala\nimport cats.syntax.all._\nimport parsley.cats.instances._\n```\n\nDocumentation can be found [**here**][Link-Scaladoc]\n\n## What is `parsley`?\n\n[Parsley](https://github.com/j-mie6/parsley) is a fast, modern, parser combinator library based loosely on Haskell's `parsec` and\n`megaparsec`. For examples, see its repo and wiki!\n\n## Known Incompatiblities\nThe following are known conflicts between the syntactic extensions of `cats` and the base combinators on `parsley`. This only needs to be considered when writing _concrete_ values of type `Parsley[A]`: combinators that rely on generic instances over a type `F` will use the `cats` version of the conflicting combinators.\n\n* The `SemigroupK` syntax for `combine` of `\u003c+\u003e` is incompatible with `parsley`, which defines\n  `\u003c+\u003e` to be a combine combinator returning `Parsley[Either[A, B]]`: the `cats` combinator `\u003c+\u003e` is known in `parsley` as `\u003c|\u003e`, `orElse`, or `|`.\n\n\n\u003c!-- examples should go here, but \u003c+\u003e conflicts between parsley and cats,\n     which makes examples difficult... --\u003e\n\n\u003c!-- Badges and Links --\u003e\n\n\n[Link-Scaladoc]: https://javadoc.io/doc/com.github.j-mie6/parsley-cats_2.13/latest/index.html\n\n[Badge-Scaladoc]: https://img.shields.io/badge/documentation-available-green\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-mie6%2Fparsley-cats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-mie6%2Fparsley-cats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-mie6%2Fparsley-cats/lists"}