Package arrow.analysis

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class DoNotLookAtArguments(    val messages: Array<String>,     val formulae: Array<String>,     val dependencies: Array<String>)
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Law

Annotation to flag ad-hoc refinements over third party functions

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Laws

This is used to mark an object as containing only laws. This way you do not have to write the annotation on every element, and you can group several of them together.

Link copied to clipboard
fun interface Messager
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class PackagesWithLaws(val packages: Array<String>)

This is used internally to speed up the search for laws Each package with any law should include this annotation in a class of module 'arrow.analysis.hints'

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Post(    val messages: Array<String>,     val formulae: Array<String>,     val dependencies: Array<String>)
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Pre(    val messages: Array<String>,     val formulae: Array<String>,     val dependencies: Array<String>)
Link copied to clipboard
fun interface Predicate<A>
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Subject(val fqName: String)

Annotation to flag ad-hoc refinements over third party functions

Functions

Link copied to clipboard
inline fun doNotLookAtArgumentsWhen(predicate: Boolean, msg: Messager)
Link copied to clipboard
inline fun <A> A.invariant(predicate: Predicate<A>, msg: Messager): A
Link copied to clipboard
inline fun <A> post(predicate: Predicate<A>, msg: Messager)
inline fun <A> A.post(predicate: Predicate<A>, msg: Messager): A
Link copied to clipboard
inline fun pre(predicate: Boolean, msg: Messager)
Link copied to clipboard
inline fun <A> unsafeBlock(block: () -> A): A

Indicates that nothing in this block should be checked.

Link copied to clipboard
inline fun <A> unsafeCall(call: A): A

Indicates that the preconditions for a call should not be checked.