-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add doctest example for ApplicativeError.raiseError #2122
Add doctest example for ApplicativeError.raiseError #2122
Conversation
* | ||
* // integer-rounded division | ||
* scala> def divide[F[_]](dividend: Int, divisor: Int)(implicit F: ApplicativeError[F, String]): F[Int] = | ||
* | if (divisor === 0) F.raiseError(s"division by zero: $dividend / 0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/home/travis/build/typelevel/cats/core/src/main/scala/cats/ApplicativeError.scala:23: Variable dividend undefined in comment for method raiseError in trait ApplicativeError
[error] * | if (divisor === 0) F.raiseError(s"division by zero: $dividend / 0")
Scaladocs seems to be parsing $XXXX
token, the easiest thing to do is probably to let it win and remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right I've dealt with this before. There's a trick to fix it, but the string interpolation isn't adding much to the example anyway so I'll just remove it.
Codecov Report
@@ Coverage Diff @@
## master #2122 +/- ##
=======================================
Coverage 94.66% 94.66%
=======================================
Files 328 328
Lines 5533 5533
Branches 199 199
=======================================
Hits 5238 5238
Misses 295 295
Continue to review full report at Codecov.
|
No description provided.