Package

supertagged

Permalink

package supertagged

Original idea (using base trait TaggedType & type Companion = Companion.Type from: Alexander Semenov (https://github.com/Treev-io/tagged-types)

Enhanced with unified syntax, recursive(on type level) tagging and overcoming some compiler bugs

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. supertagged
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type @@[T, +U] = T with Tag[T, U]

    Permalink
  2. trait ClassicTagger[U] extends AnyRef

    Permalink

    Classic way.

    Classic way. Original idea: Miles Sabin

  3. trait LifterF[F[_]] extends AnyRef

    Permalink

    Lift ( Adopted and simplified from: https://github.com/softwaremill/scala-common/blob/master/tagging/src/main/scala/com/softwaremill/tagging/TypeclassTaggingCompat.scala) *

  4. implicit final class PostfixSugar[C] extends AnyVal

    Permalink

    For pretty coding value @@ MyTag

  5. sealed trait Tag[T, +U] extends Any

    Permalink

    Making universal trait for overcoming feature bug(knowing as [I cannot be cast to [Ljava.lang.Object; - see at TestScalacBug).

    Making universal trait for overcoming feature bug(knowing as [I cannot be cast to [Ljava.lang.Object; - see at TestScalacBug). Everything seems ok for now. There is no runtime overhead(after jit). Casting doesn't change memory model, boxing for primitive types appears only at specific corner cases and JIT cleans generated rubbish bytecode very well

  6. type Tagged[T, +U] = T with Tag[T, U]

    Permalink
  7. trait TaggedType[T] extends AnyRef

    Permalink

    Example: object Width extends TaggedType[Int] type Width = Width.Type // this for pretty coding: def method(v:Width)

  8. trait Tagger[TagIn, Tag, U, SubType, C] extends AnyRef

    Permalink

    Magic starts here *

Value Members

  1. def @@[U]: ClassicTagger[U]

    Permalink
  2. object Tagger

    Permalink
  3. implicit def liftLifterF[F[_], T, U](implicit f: F[T], lifter: LifterF[F]): F[@@[T, U]]

    Permalink
  4. object lifterF

    Permalink
  5. def tag[U]: ClassicTagger[U]

    Permalink
  6. def untag[T, U](value: @@[T, U]): T

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped