abstract class Is[A, B] extends Serializable
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.
- Alphabetic
- By Inheritance
- Is
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Is()
Abstract Value Members
-
abstract
def
substitute[F[_]](fa: F[A]): F[B]
To create an instance of
A Is B
you must show that for every choice ofF[_]
you can convertF[A]
toF[B]
.To create an instance of
A Is B
you must show that for every choice ofF[_]
you can convertF[A]
toF[B]
. Loosely, this reads as saying thatB
must have the same effect asA
in all contexts therefore allowing type substitution.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
andThen[C](next: Is[B, C]): Is[A, C]
Is
is transitive and therefore values ofIs
can be composed in a chain much like functions.Is
is transitive and therefore values ofIs
can be composed in a chain much like functions. See alsocompose
.- Annotations
- @inline()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
coerce(a: A): B
Substitution on identity brings about a direct coercion function of the same form that
=:=
provides.Substitution on identity brings about a direct coercion function of the same form that
=:=
provides.- Annotations
- @inline()
-
final
def
compose[C](prev: Is[C, A]): Is[C, B]
Is
is transitive and therefore values ofIs
can be composed in a chain much like functions.Is
is transitive and therefore values ofIs
can be composed in a chain much like functions. See alsoandThen
.- Annotations
- @inline()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flip: Is[B, A]
Is
is symmetric and therefore can be flipped around.Is
is symmetric and therefore can be flipped around. Flipping is its own inverse, sox.flip.flip == x
.- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
lift[F[_]]: Is[F[A], F[B]]
Sometimes for more complex substitutions it helps the typechecker to wrap one layer of
F[_]
context around the types you're equating before substitution.Sometimes for more complex substitutions it helps the typechecker to wrap one layer of
F[_]
context around the types you're equating before substitution.- Annotations
- @inline()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
predefEq: =:=[A, B]
A value
A Is B
is always sufficient to produce a similarPredef.=:=
value.A value
A Is B
is always sufficient to produce a similarPredef.=:=
value.- Annotations
- @inline()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()