Object/Trait

scalaz

Leibniz

Related Docs: trait Leibniz | package scalaz

Permalink

object Leibniz extends LeibnizInstances with LeibnizFunctions

Source
Leibniz.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Leibniz
  2. LeibnizFunctions
  3. LeibnizInstances
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type ===[A, B] = Leibniz[, , A, B]

    Permalink

    (A === B) is a supertype of Leibniz[L,H,A,B]

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def force[L, H >: L, A >: L <: H, B >: L <: H]: Leibniz[L, H, A, B]

    Permalink

    Unsafe coercion between types.

    Unsafe coercion between types. force abuses asInstanceOf to explicitly coerce types. It is unsafe, but needed where Leibnizian equality isn't sufficient

    Definition Classes
    LeibnizFunctions
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. implicit def leibniz: Category[===]

    Permalink
    Definition Classes
    LeibnizInstances
  14. def lift[LA, LT, HA >: LA, HT >: LT, T[_ >: LA <: HA] >: LT <: HT, A >: LA <: HA, A2 >: LA <: HA](a: Leibniz[LA, HA, A, A2]): Leibniz[LT, HT, T[A], T[A2]]

    Permalink

    We can lift equality into any type constructor

    We can lift equality into any type constructor

    Definition Classes
    LeibnizFunctions
  15. def lift2[LA, LB, LT, HA >: LA, HB >: LB, HT >: LT, T[_ >: LA <: HA, _ >: LB <: HB] >: LT <: HT, A >: LA <: HA, A2 >: LA <: HA, B >: LB <: HB, B2 >: LB <: HB](a: Leibniz[LA, HA, A, A2], b: Leibniz[LB, HB, B, B2]): Leibniz[LT, HT, T[A, B], T[A2, B2]]

    Permalink

    We can lift equality into any type constructor

    We can lift equality into any type constructor

    Definition Classes
    LeibnizFunctions
  16. def lift3[LA, LB, LC, LT, HA >: LA, HB >: LB, HC >: LC, HT >: LT, T[_ >: LA <: HA, _ >: LB <: HB, _ >: LC <: HC] >: LT <: HT, A >: LA <: HA, A2 >: LA <: HA, B >: LB <: HB, B2 >: LB <: HB, C >: LC <: HC, C2 >: LC <: HC](a: Leibniz[LA, HA, A, A2], b: Leibniz[LB, HB, B, B2], c: Leibniz[LC, HC, C, C2]): Leibniz[LT, HT, T[A, B, C], T[A2, B2, C2]]

    Permalink

    We can lift equality into any type constructor

    We can lift equality into any type constructor

    Definition Classes
    LeibnizFunctions
  17. def lower[LA, HA >: LA, T[_ >: LA <: HA], A >: LA <: HA, A2 >: LA <: HA](t: ===[T[A], T[A2]]): Leibniz[LA, HA, A, A2]

    Permalink

    Emir Pasalic's PhD thesis mentions that it is unknown whether or not ((A,B) === (C,D)) => (A === C) is inhabited.

    Emir Pasalic's PhD thesis mentions that it is unknown whether or not ((A,B) === (C,D)) => (A === C) is inhabited.

    Haskell can work around this issue by abusing type families as noted in Leibniz equality can be injective (Oleg Kiselyov, Haskell Cafe Mailing List 2010) but we instead turn to force.

    Definition Classes
    LeibnizFunctions
  18. def lower2[LA, HA >: LA, LB, HB >: LB, T[_ >: LA <: HA, _ >: LB <: HB], A >: LA <: HA, A2 >: LA <: HA, B >: LB <: HB, B2 >: LB <: HB](t: ===[T[A, B], T[A2, B2]]): (Leibniz[LA, HA, A, A2], Leibniz[LB, HB, B, B2])

    Permalink
    Definition Classes
    LeibnizFunctions
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. implicit def refl[A]: Leibniz[A, A, A, A]

    Permalink

    Equality is reflexive -- we rely on subtyping to expand this type

    Equality is reflexive -- we rely on subtyping to expand this type

    Definition Classes
    LeibnizFunctions
  23. implicit def subst[A, B](a: A)(implicit f: ===[A, B]): B

    Permalink
    Definition Classes
    LeibnizFunctions
  24. def symm[L, H >: L, A >: L <: H, B >: L <: H](f: Leibniz[L, H, A, B]): Leibniz[L, H, B, A]

    Permalink

    Equality is symmetric

    Equality is symmetric

    Definition Classes
    LeibnizFunctions
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. def trans[L, H >: L, A >: L <: H, B >: L <: H, C >: L <: H](f: Leibniz[L, H, B, C], g: Leibniz[L, H, A, B]): Leibniz[L, H, A, C]

    Permalink

    Equality is transitive

    Equality is transitive

    Definition Classes
    LeibnizFunctions
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. implicit def witness[A, B](f: ===[A, B]): (A) ⇒ B

    Permalink

    We can witness equality by using it to convert between types We rely on subtyping to enable this to work for any Leibniz arrow

    We can witness equality by using it to convert between types We rely on subtyping to enable this to work for any Leibniz arrow

    Definition Classes
    LeibnizFunctions

Inherited from LeibnizFunctions

Inherited from LeibnizInstances

Inherited from AnyRef

Inherited from Any

Ungrouped