io.kjaer.compiletime

Type members

Classlikes

final case class #:[+H <: Dimension, +T <: Shape](head: H, tail: T) extends Shape
final case class :::[+H <: Index, +T <: Indices](head: H, tail: T) extends Indices
sealed trait INil extends Indices
Companion
object
case object INil extends INil
Companion
class
sealed trait Indices
Companion
object
object Indices
Companion
class
final class IndicesOf[T <: Indices](val value: T)

Type-class used to materialize the singleton type of an Indices.

Type-class used to materialize the singleton type of an Indices.

See also

ShapeOf

Companion
object
object IndicesOf
Companion
class
sealed trait SNil extends Shape
Companion
object
case object SNil extends SNil
Companion
class
sealed trait Shape extends Product with Serializable
Companion
object
object Shape
Companion
class
final class ShapeOf[T <: Shape](val value: T)

Type-class used to materialize the singleton type of a Shape.

Type-class used to materialize the singleton type of a Shape.

This is useful to implicitly convert a type-level representation of a Shape to a term representing the same Shape, for instance by using the shapeOf method:

shapeOf[SNil.type]      //=> SNil
shapeOf[1 #: 2 #: SNil] //=> 1 #: 2 #: SNil
Companion
object
object ShapeOf
Companion
class

Types

type Dimension = Int & Singleton
type Index = Int & Singleton

Value members

Concrete methods

inline def indicesOf[I <: Indices](using i: IndicesOf[I]): I
inline def shapeOf[S <: Shape](using s: ShapeOf[S]): S

Extensions

Extensions

extension (x: Int)
def add[X <: Int, Y <: Int](y: Y): X + Y
def le[X <: Int, Y <: Int](y: Y): X <= Y
def lt[X <: Int, Y <: Int](y: Y): X < Y
def mul[X <: Int, Y <: Int](y: Y): X * Y
def sub[X <: Int, Y <: Int](y: Y): X - Y