TypeRepr

zio.blocks.typeid.TypeRepr
See theTypeRepr companion object
sealed trait TypeRepr

Represents type expressions in the Scala type system.

TypeRepr can represent:

  • Simple type references (Int, String)
  • Applied types (List[Int], Map[String, Int])
  • Type parameter references (A, F[_])
  • Structural/refinement types ({ def foo: Int })
  • Intersection types (A & B & C)
  • Union types (A | B | C)
  • Tuple types ((A, B, C))
  • Function types (A => B, (A, B) ?=> C)
  • Singleton types (x.type)
  • Literal/constant types (42, "foo")
  • Type lambdas ([X] =>> F[X])
  • Wildcards (? : Lower)
  • And more...

Attributes

Companion
object
Source
TypeRepr.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Annotated
object AnyKindType
object AnyType
class Applied
class ByName
trait Constant
class BooleanConst
class CharConst
class ClassOfConst
class DoubleConst
class FloatConst
class IntConst
class LongConst
object NullConst
class StringConst
object UnitConst
class Function
class Intersection
object NothingType
object NullType
class ParamRef
class Ref
class Repeated
class Singleton
class Structural
class ThisType
class Tuple
class TypeLambda
class TypeSelect
class Union
object UnitType
class Wildcard
Show all

Members list

Value members

Concrete methods

def containsParam(param: TypeParam): Boolean

Returns true if this type expression references the given type parameter.

Returns true if this type expression references the given type parameter.

Attributes

Source
TypeRepr.scala