Cats instances for fastparse
Switch branches/tags
Clone or download
johnynek Update README.md
add links to cats and fastparse
Latest commit 0aa87de May 6, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
byte/src Add fastparse-byte support May 5, 2018
core/src Simplify map2Eval May 5, 2018
project Improve Build, setup Travis (#1) May 4, 2018
.gitignore initial commit Apr 29, 2018
.travis.yml Improve Build, setup Travis (#1) May 4, 2018
LICENSE Initial commit Apr 29, 2018
README.md Update README.md May 6, 2018
build.sbt Use correct scalacheck May 5, 2018
version.sbt Setting version to 0.1.1-SNAPSHOT May 5, 2018

README.md

Build Status codecov.io Latest version

fastparse-cats

Cats instances for Fastparse parsers.

This gives you a lawful Monad and Alternative for fastparse Parsers. This allows you to easily reuse generic functions from cats with fastparse.

Quick Start

fastparse-cats supports Scala 2.11, and 2.12. It supports both the JVM and JS platforms.

To use fastparse-cats in your own project, you can include this snippet in your build.sbt file:

// use this snippet for the JVM
libraryDependencies ++= List("org.bykn" %% "fastparse-cats-core" % "0.1.0")

// use this snippet for JS, or cross-building
libraryDependencies ++= List("org.bykn" %%% "fastparse-cats-core" % "0.1.0")

There is also support for fastparse-byte by using

libraryDependencies ++= List("org.bykn" %% "fastparse-cats-byte" % "0.1.0")

To use the instances, make the following imports:

// get the Monad and Alternative for string Parser
import org.bykn.fastparse_cats.StringInstances._

or

// get the Monad and Alternative for byte Parser
import org.bykn.fastparse_cats.ByteInstances._

There are also utilities at buildParser.{ delay, suspend, pure, fromEval, fromEvalParser } to build generic parsers lazily.