object Tag
- Source
- Tag.scala
- Alphabetic
- By Inheritance
- Tag
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
class
TagOf[T] extends ~>[Id.Id, [α$0$][email protected]@[α$0$, T]]
- See also
Tag.of
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
-
def
apply[A, T](a: A): @@[A, T]
substspecialized toId.substspecialized toId.- Annotations
- @inline()
- To do
According to Miles, @specialized doesn't help here. Maybe manually specialize.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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
- val k: TagKind
-
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()
-
def
of[T]: TagOf[T]
Variants of
apply,subst, andunsubstthat require specifying the tag type but are more likely to infer the other type parameters. -
def
subst[A, F[_], T](fa: F[A]): F[@@[A, T]]
Add a tag
TtoA.Add a tag
TtoA.NB: It is unwise to
substorunsubsta tag in anFthat is sensitive to theAtype within. For example, ifFis a GADT, rather than a normal ADT, it will be type-correct, but probably not what you expect. For "normal" types likeListand function types, it is safe. More broadly, if it is possible to write a legal scalaz.InvariantFunctor over the parameter,substof that parameter is safe. This is becausesubsteffectively provides evidence that a type and all its tagged variants are equal; tagging works to discriminate types because that fact is not implicit to the compiler.We do not have a type role system in Scala with which to declare the exact situations under which
substis safe. If we did, we would declare thatsubstis safe if and only if the parameter has "representational" or "phantom" role.- Annotations
- @inline()
-
def
subst1[G[_], F[_[_]], T](fa: F[G]): F[[α][email protected]@[G[α], T]]
Add a tag
TtoG[_] -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unsubst[A, F[_], T](fa: F[@@[A, T]]): F[A]
Remove the tag
T, leavingA.Remove the tag
T, leavingA.- Annotations
- @inline()
-
def
unsubst1[G[_], F[_[_]], T](fa: F[[α][email protected]@[G[α], T]]): F[G]
Remove the tag
T, leavingGRemove the tag
T, leavingG- Annotations
- @inline()
-
def
unwrap[A, T](a: @@[A, T]): A
unsubstspecialized toId.unsubstspecialized toId.- Annotations
- @inline()
-
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
- @native() @throws( ... )