ru.primetalk.typed.ontology.simplemeta1

Type members

Classlikes

sealed trait RecordProperty[-A]

Type of record property identifier.

Type of record property identifier.

sealed trait RecordSchema[R]

Schema of properties for record R. We can use tuples to represent instances of this schema.

Schema of properties for record R. We can use tuples to represent instances of this schema.

Companion:
object
Companion:
class
abstract class SimplePropertyId[-A, B](val name: String, val tpe: ClassTag[B]) extends RecordProperty[A]

Metainformation about property. Contains unique name (within the type) and type of the value. Might contain other metainformation about property, like Schema.

Metainformation about property. Contains unique name (within the type) and type of the value. Might contain other metainformation about property, like Schema.

Value members

Concrete methods

def fieldsImpl[R](expr: Expr[Seq[RecordProperty[Record[R]]]], schemaExpr: Expr[RecordSchema[R]])(using r: Type[R])(using Quotes): Expr[RecordSchema[R]]

Extensions

Extensions

extension [R, S <: RecordSchema[R]](schema: S)
infix def #:[R, S <: RecordSchema[R]](schema: S): RecordSchema[R] { type ParentSchemaOrNothing = S; type Properties = P *: Properties; type PropertySet = PropertySet | P; type Values = P *: Values; }
def prepend[P <: RecordProperty[Record[R]]](p: P): RecordSchema[R] { type ParentSchemaOrNothing = S; type Properties = P *: Properties; type PropertySet = PropertySet | P; type Values = P *: Values; }
extension [D <: Tuple](t: D)
def get[T, R, P <: SimplePropertyId[Record[R], T]](p: P)(using schema: RecordSchema[R])(using ev: D =:= Values): Option[T]