Module Knowledge.Slot

Property accessor.

Properties are accessed by slots. A slot is a first-class record field. Slots are declarative, each new declaration of a slot creates a new instance. Slot names should be unique - it is not allowed to have two slots with the same name, even if they belong to different classes.

To declare a new slot of a class use the Class.property function. This module enables slot introspection.

type ('a, 'p) t = ('a, 'p) slot
val domain : ('a, 'p) slot -> 'p domain

domain slot the slot domain.

val cls : ('a, _) slot -> ('a, unit) cls

cls slot slot's class.

val name : ('a, 'p) slot -> name

name slot the slot name.

val desc : ('a, 'p) slot -> string

desc slot the slot documentation.