-
Notifications
You must be signed in to change notification settings - Fork 21
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
Docs for Arrow Analysis #41
Conversation
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.
```kotlin | ||
import arrow.analysis.pre | ||
|
||
fun increment(x: Int): Int { | ||
pre(x > 0) { "value must be positive" } | ||
return x + 1 | ||
} | ||
``` |
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.
Can we setup KotlinX Knit for this?
```plain | ||
e: pre-condition `value must be positive` is not satisfied in `increment(-1)` | ||
-> unsatisfiable constraint: `(-1 > 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.
We could even setup KotlinX Knit for this, given that this is testable in a unit test.
If you're interested in that, I'd be happy to setup a Knit Test Template.
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.
Can we check the output of the compiler using Knit?
@nomisRev Weird, I cannot reproduce the problem in my machine. What are the steps you've taken to crash? |
|
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.
Reported issue not reproducible by @serras. Let's test it again at a later time, perhaps an issue in my local environment.
These have been copied from the old website