Packages

p

cats

evidence

package evidence

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. evidence
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type <~<[-A, +B] = As[A, B]

    A convenient type alias for As, this declares that A is a subtype of B, and should be able to be a B is expected.

  2. type ===[A, B] = Is[A, B]

    A convenient type alias for Is, which declares that A is the same type as B.

  3. type >~>[+B, -A] = As[A, B]

    A flipped alias, for those used to their arrows running left to right

  4. sealed abstract class As[-A, +B] extends Serializable

    As substitutability: A better <:<

    As substitutability: A better <:<

    This class exists to aid in the capture proof of subtyping relationships, which can be applied in other context to widen other type

    A As B holds whenever A could be used in any negative context that expects a B. (e.g. if you could pass an A into any function that expects a B as input.)

    This code was ported directly from scalaz to cats using this version from scalaz: https://github.com/scalaz/scalaz/blob/a89b6d63/core/src/main/scala/scalaz/As.scala

    The original contribution to scalaz came from Jason Zaugg

  5. sealed abstract class AsInstances extends AnyRef
  6. abstract class Is[A, B] extends Serializable

    A value of A Is B is proof that the types A and B are the same.

    A value of A Is B is proof that the types A and B are the same. More powerfully, it asserts that they have the same meaning in all type contexts. This can be a more powerful assertion than A =:= B and is more easily used in manipulation of types while avoiding (potentially erroneous) coercions.

    A Is B is also known as Leibniz equality.

  7. sealed abstract class IsInstances extends AnyRef
  8. type Leibniz[A, B] = Is[A, B]

    This type level equality represented by Is is referred to as "Leibniz equality", and it had the name "Leibniz" in the scalaz https://en.wikipedia.org/wiki/Gottfried_Wilhelm_Leibniz

  9. type Liskov[-A, +B] = As[A, B]

    The property that a value of type A can be used in a context expecting a B if A <~< B is referred to as the "Liskov Substitution Principle", which is named for Barbara Liskov: https://en.wikipedia.org/wiki/Barbara_Liskov

Value Members

  1. object As extends AsInstances with Serializable
  2. object Is extends IsInstances with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped