tpolecat / atto

friendly little parsers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems compiling stringOf in 0.5.x branch

davidnadeau opened this issue · comments

I am using the cats compat lib, and cannot get the stringOf operator to compile. I am getting two errorr:

Error:(7, 21) could not find implicit value for evidence parameter of type atto.compat.NonEmptyListy[F]
    term <- stringOf(letter)
Error:(7, 21) not enough arguments for method stringOf: (implicit evidence$1: atto.compat.NonEmptyListy[F])atto.Parser[String].
Unspecified value parameter evidence$1.
    term <- stringOf(letter)

the error can be reproduced with this code:

import atto._, Atto._, atto.compat.cats._

object mvp extends App {

  val parser = for {
    term <- stringOf(letter)
  } yield term

}

build.sbt:

scalaVersion := "2.11.8"

libraryDependencies ++= Seq(
  "org.typelevel" %% "cats"  % "0.7.2",
  "org.tpolecat" %% "atto-core"     % "0.5.0-SNAPSHOT",
  "org.tpolecat" %% "atto-compat-cats"     % "0.5.0-SNAPSHOT"
)

resolvers ++= Seq(
  "atto" at "https://oss.sonatype.org/content/repositories/snapshots/"
)

How can I provide this evidence? or should the compat library be handling this?