object
TagUsage extends App
Value Members
-
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
-
final
def
==(arg0: Any): Boolean
-
-
def
args: Array[String]
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
delayedInit(body: ⇒ Unit): Unit
-
-
-
def
equalsTrue(x: Any): Boolean
-
val
executionStart: Long
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
main(args: Array[String]): Unit
-
def
minOption[A](a: @@[List[A], Sorted]): Option[A]
-
def
minOption_v2[A]: (@@[List[A], Sorted]) ⇒ Option[A]
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
-
def
sortList[A](as: List[A])(implicit arg0: scala.math.Ordering[A]): @@[List[A], Sorted]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
scalaz contains a way to simulate something similar to a Haskell newtype, where we can take an existing type, and create a new type from it, and allow us to create new typeclass instances for our newly created type to get different behaviors. The same thing could be done with scala 2.10's Value Classes: http://docs.scala-lang.org/overviews/core/value-classes.html however one has to be very careful when using value classes, because there are a lot of instances in which using a value class will incur a runtime boxing/unboxing of your value, which incurs a runtime cost. The scalaz tagged types will never cause boxing of a value that is already
AnyRef
.