Package

robots

Permalink

package robots

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. robots
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class PValidator[F[_], E, A, B](validate: (A) ⇒ F[E], f: (A) ⇒ B)(implicit FF: Traverse[F], M: MonoidK[F]) extends Product with Serializable

    Permalink

    PValidator wraps up a validation function validate: A => F[E] which validates the input A and returns a structure of error messages F[E].

    PValidator wraps up a validation function validate: A => F[E] which validates the input A and returns a structure of error messages F[E].

    The P in PValidator denotes the fact that this validation is polymorphic, in the sense that its input does not have to be of the same type as its output.

    This may be useful when a successful validation provides some knowledge about the value that is being validated that can be used to refine its type.

    For example, a required validator makes use of the fact that it has ensured that an Option[A] is not empty to safely unwrap the option's inner value.

  2. type Validator[F[_], E, A] = PValidator[F, E, A, A]

    Permalink

    A Validator[F[_], E, A] wraps a validation function A => F[E] and provides functions to accumulate the results of this validation into different structures and to combine validations together so that validations for properties of an object can be combined together to form a validator for the entire object.

Value Members

  1. object PValidator extends PValidatorInstances with Serializable

    Permalink

    The companion object for PValidator provides various type class instances for PValidator.

  2. object Validator extends Serializable

    Permalink

    The companion object for Validator provides a number of functions for constructing simple validators.

    The companion object for Validator provides a number of functions for constructing simple validators.

    Validators for comparisons and equality checking can be constructed for types with Order and Eq instances, respectively.

    There are also functions provided for constructing validators which always pass and which always fail.

Inherited from AnyRef

Inherited from Any

Ungrouped