Skip to content
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

Merged
merged 2 commits into from
Dec 20, 2017

Conversation

ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Dec 20, 2017

No description provided.

LukaJCB
LukaJCB previously approved these changes Dec 20, 2017
*
* // 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")
Copy link
Contributor

@kailuowang kailuowang Dec 20, 2017

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.

Copy link
Contributor Author

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-io
Copy link

codecov-io commented Dec 20, 2017

Codecov Report

Merging #2122 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2122   +/-   ##
=======================================
  Coverage   94.66%   94.66%           
=======================================
  Files         328      328           
  Lines        5533     5533           
  Branches      199      199           
=======================================
  Hits         5238     5238           
  Misses        295      295
Impacted Files Coverage Δ
core/src/main/scala/cats/ApplicativeError.scala 88.23% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5051b36...0df42a9. Read the comment docs.

@kailuowang kailuowang added this to the 1.1 milestone Dec 20, 2017
@kailuowang kailuowang merged commit 6d497eb into typelevel:master Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants