我正在阅读 fastparse 的教程/解释,并收到错误消息
error: No implicit view available from fastparse.P[Any] => fastparse.P[Unit]
对于序列示例。
我正在使用 sbt 1.3.8 和 scala 2.13.1。fastparse 的定义版本是 2.2.2。
scala> import fastparse._
import fastparse._
scala> def ab[_:P] = P("a" ~ "b")
^
error: No implicit view available from fastparse.P[Any] => fastparse.P[Unit].
scala> def a[_:P] = P("a")
a: [_](implicit evidence$1: fastparse.P[Any])fastparse.package.P[Unit]
scala> def b[_:P] = P("b")
b: [_](implicit evidence$1: fastparse.P[Any])fastparse.package.P[Unit]
scala> def ab[_:P] = P(a ~ b)
^
error: No implicit view available from fastparse.package.P[Any] => fastparse.package.P[Unit].
scala> def ab[_:P] = P("a" | "b")
ab: [_](implicit evidence$1: fastparse.P[Any])fastparse.package.P[Unit]
scala> fastparse.parse("a", ab(_))
res2: fastparse.Parsed[Unit] = Parsed.Success((), 1)
这个错误是什么意思,我做错了什么/我怎样才能在没有错误的情况下结束这个教程步骤?