zio.blocks.typeid
Members list
Type members
Classlikes
Represents a Scala/Java annotation on a type, method, or other declaration.
Represents a Scala/Java annotation on a type, method, or other declaration.
Annotations carry metadata that can be inspected at compile-time or runtime. Examples:
@deprecated("use newMethod", "1.0")@tailrec@JsonProperty("field_name")
Value parameters
- args
-
The arguments passed to the annotation constructor
- typeId
-
The TypeId of the annotation class
Attributes
- Source
- Annotation.scala
- Supertypes
Attributes
- Companion
- trait
- Source
- Annotation.scala
- Supertypes
- Self type
-
AnnotationArg.type
Represents an argument to an annotation.
Represents an argument to an annotation.
Annotation arguments can be:
- Constant values (strings, numbers, booleans, etc.)
- Arrays of values
- Named arguments
- Nested annotations
- Class references
- Enum values
Attributes
- Companion
- object
- Source
- Annotation.scala
- Supertypes
- Known subtypes
This object was generated by sbt-buildinfo.
This object was generated by sbt-buildinfo.
Attributes
- Source
- BuildInfo.scala
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Self type
-
BuildInfo.type
A parameter of an enum case.
A parameter of an enum case.
Value parameters
- name
-
The parameter name
- tpe
-
The parameter type
Attributes
- Source
- TypeDefKind.scala
- Supertypes
A compile-time witness that A is a nominal intersection type — either a single nominal type or a conjunction (A & B / A with B) of nominal types.
A compile-time witness that A is a nominal intersection type — either a single nominal type or a conjunction (A & B / A with B) of nominal types.
Each member of the intersection must itself satisfy IsNominalType constraints: no union branches, no structural refinements, no unresolved type parameters. Derivation fails at compile time if any member is non-nominal.
The primary use-case is Context, which keys its internal map by the erased TypeId of each member in the intersection.
Type parameters
- A
-
The intersection type being witnessed. May be a plain nominal type (in which case typeIdsErased has length 1) or an intersection (length ≥ 2).
Attributes
- Companion
- object
- Source
- IsNominalIntersection.scala
- Supertypes
Attributes
- Companion
- trait
- Source
- IsNominalIntersection.scala
- Supertypes
- Self type
A compile-time witness that A is a nominal type.
A compile-time witness that A is a nominal type.
A nominal type is any fully-known, concrete named type: a class, trait, object, enum, or applied type constructor (e.g. List[Int]). Abstract type parameters, union types (A | B), intersection types (A & B), structural refinements, and type lambdas are not nominal and will cause derivation to fail with a compile error.
IsNominalType[A] is automatically derived by a macro when A is nominal. The key effect of requiring IsNominalType[A] in a method signature is that it prevents the method from being called with an unresolved type parameter, ensuring the type is concrete at the call site.
Type parameters
- A
-
The type being witnessed as nominal.
Attributes
- Companion
- object
- Source
- IsNominalType.scala
- Supertypes
Attributes
- Companion
- trait
- Source
- IsNominalType.scala
- Supertypes
- Self type
-
IsNominalType.type
Represents the "kind" of a type - the type of a type.
Represents the "kind" of a type - the type of a type.
In Scala's type system:
- Proper types like
Int,Stringhave kind*(Type) - Type constructors like
List,Optionhave kind* -> * - Higher-kinded types like
Monadhave kind(* -> *) -> *
This is essential for correctly representing higher-kinded types and ensuring kind-correctness in type expressions.
Attributes
- Companion
- object
- Source
- Kind.scala
- Supertypes
- Known subtypes
Attributes
- Companion
- trait
- Source
- Kind.scala
- Supertypes
- Self type
-
Kind.type
Represents a member of a structural (refinement) type.
Represents a member of a structural (refinement) type.
Members include:
- Val/Var declarations (
val x: Int,var y: String) - Method declarations (
def foo(x: Int): String) - Type members (
type T,type T <: Bound)
Attributes
- Companion
- object
- Source
- Member.scala
- Supertypes
- Known subtypes
Attributes
- Companion
- trait
- Source
- Member.scala
- Supertypes
- Self type
-
Member.type
Attributes
- Companion
- class
- Source
- Owner.scala
- Supertypes
- Self type
-
Owner.type
Represents where a type is defined in the Scala/Java ecosystem.
Represents where a type is defined in the Scala/Java ecosystem.
An Owner encapsulates the hierarchical ownership chain of a type, which can include packages, terms (objects/values), and types.
For example, for a type MyClass defined as:
package com.example
object Outer {
class MyClass
}
The owner would be:
Owner(List(
Owner.Package("com"),
Owner.Package("example"),
Owner.Term("Outer")
))
Attributes
- Companion
- object
- Source
- Owner.scala
- Supertypes
A method parameter.
A method parameter.
Value parameters
- defaultValue
-
Whether this parameter has a default value (we don't store the value itself)
- isImplicit
-
Whether this is an implicit parameter
- name
-
The name of the parameter
- tpe
-
The type of the parameter
Attributes
- Source
- Member.scala
- Supertypes
Represents a path to a term value, used for singleton types.
Represents a path to a term value, used for singleton types.
For example, for a singleton type MyObject.Inner.value.type:
TermPath(List(
TermPath.Package("com"),
TermPath.Package("example"),
TermPath.Term("MyObject"),
TermPath.Term("Inner"),
TermPath.Term("value")
))
Attributes
- Companion
- object
- Source
- TermPath.scala
- Supertypes
Attributes
- Companion
- class
- Source
- TermPath.scala
- Supertypes
- Self type
-
TermPath.type
An element of a tuple type.
An element of a tuple type.
In Scala 3.5+, tuple elements can have labels (named tuples): (name: String, age: Int)
Value parameters
- label
-
Optional label for named tuples
- tpe
-
The type of this element
Attributes
- Source
- TypeRepr.scala
- Supertypes
Attributes
- Companion
- class
- Source
- TypeBounds.scala
- Supertypes
- Self type
-
TypeBounds.type
Represents the bounds of a type parameter or abstract type member.
Represents the bounds of a type parameter or abstract type member.
In Scala, type bounds are expressed as:
A : Lower(lower bound only)- `A >: Lower :), None means Nothing
Value parameters
- upper
-
The upper bound (<:), None means Any
Attributes
- Companion
- object
- Source
- TypeBounds.scala
- Supertypes
Attributes
- Companion
- trait
- Source
- TypeDefKind.scala
- Supertypes
- Self type
-
TypeDefKind.type
Classifies what kind of type definition a TypeId represents.
Classifies what kind of type definition a TypeId represents.
This enables distinguishing between:
- Classes (regular, case, abstract, final, value)
- Traits (regular, sealed)
- Objects (singleton objects)
- Enums (Scala 3 enums with cases)
- Type aliases and opaque types
- Abstract type members
Attributes
- Companion
- object
- Source
- TypeDefKind.scala
- Supertypes
- Known subtypes
-
object AbstractTypeclass Classclass Enumclass EnumCaseclass Objectclass OpaqueTypeclass Traitobject TypeAliasobject UnknownShow all
Represents the identity of a type or type constructor.
Represents the identity of a type or type constructor.
TypeId provides rich type identity information including:
- The type's name
- The owner (package/class/object where it's defined)
- Type parameters (for type constructors)
- Classification (nominal, alias, or opaque)
- Parent types and self type
- Annotations
The phantom type parameter A ensures type safety when working with TypeId values. In Scala 3, A is bounded by AnyKind to support higher-kinded types.
Type parameters
- A
-
The type (or type constructor) this TypeId represents
Attributes
- Companion
- object
- Source
- TypeId.scala
- Supertypes
Attributes
- Companion
- trait
- Source
- TypeId.scala
- Supertypes
- Self type
-
TypeId.type
Attributes
- Companion
- trait
- Source
- TypeIdInstances.scala
- Supertypes
- Self type
-
TypeIdInstances.type
Provides predefined TypeId instances for common types. These instances are available implicitly when importing TypeId.
Provides predefined TypeId instances for common types. These instances are available implicitly when importing TypeId.
Attributes
- Companion
- object
- Source
- TypeIdInstances.scala
- Supertypes
- Known subtypes
-
object TypeIdobject TypeIdInstances
Low-priority implicit for TypeId derivation.
Low-priority implicit for TypeId derivation.
This trait provides the derived given which has lower priority than the predefined instances in TypeIdInstances. This ensures that when both a predefined instance and derived could match, the predefined instance wins.
Attributes
- Source
- TypeIdLowPriority.scala
- Supertypes
- Known subtypes
-
object TypeId
Attributes
- Source
- TypeIdMacros.scala
- Supertypes
- Self type
-
TypeIdMacros.type
Platform-specific methods for TypeId.
Platform-specific methods for TypeId.
On JVM, provides reflection-based capabilities. On JS, returns None for reflection operations.
Attributes
- Source
- TypeIdPlatformSpecific.scala
- Supertypes
- Known subtypes
-
trait TypeId[A]
- Self type
-
Provides idiomatic Scala type rendering for TypeId, TypeRepr, and TypeParam.
Provides idiomatic Scala type rendering for TypeId, TypeRepr, and TypeParam.
This object converts type representations into readable Scala syntax strings, making them suitable for display in error messages, documentation, and debugging output.
Attributes
- Source
- TypeIdPrinter.scala
- Supertypes
- Self type
-
TypeIdPrinter.type
Attributes
- Companion
- class
- Source
- TypeParam.scala
- Supertypes
- Self type
-
TypeParam.type
Represents a type parameter specification.
Represents a type parameter specification.
A TypeParam captures the essential information about a type parameter, including its name, position, variance, bounds, and kind.
For example, for Either[+A, +B]:
Awould beTypeParam("A", 0, Variance.Covariant)Bwould beTypeParam("B", 1, Variance.Covariant)
For Functor[F[_]]:
Fwould beTypeParam("F", 0, Variance.Invariant, TypeBounds.Unbounded, Kind.Star1)
Value parameters
- bounds
-
The type bounds (>: Lower *, etc.)
- index
-
The position in the type parameter list (0-indexed)
- name
-
The name of the type parameter
- variance
-
The variance annotation (+, -, or none)
Attributes
- Companion
- object
- Source
- TypeParam.scala
- Supertypes
Attributes
- Companion
- trait
- Source
- TypeRepr.scala
- Supertypes
- Self type
-
TypeRepr.type
Represents type expressions in the Scala type system.
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
- Supertypes
- Known subtypes
-
class Annotatedobject AnyKindTypeobject AnyTypeclass Appliedclass ByNametrait Constantclass BooleanConstclass CharConstclass ClassOfConstclass DoubleConstclass FloatConstclass IntConstclass LongConstobject NullConstclass StringConstobject UnitConstclass ContextFunctionclass Functionclass Intersectionobject NothingTypeobject NullTypeclass ParamRefclass Refclass Repeatedclass Singletonclass Structuralclass ThisTypeclass Tupleclass TypeLambdaclass TypeProjectionclass TypeSelectclass Unionobject UnitTypeclass WildcardShow all
Attributes
- Companion
- trait
- Source
- Variance.scala
- Supertypes
- Self type
-
Variance.type
Represents the variance of a type parameter.
Represents the variance of a type parameter.
Variance determines how subtyping of type arguments affects subtyping of parameterized types:
- Covariant (+A): If
Dog <: Animal, thenList[Dog] <: List[Animal] - Contravariant (-A): If
Dog <: Animal, thenHandler[Animal] <: Handler[Dog] - Invariant (A): No subtyping relationship between
Box[Dog]andBox[Animal]
Attributes
- Companion
- object
- Source
- Variance.scala
- Supertypes
- Known subtypes