Next: , Previous: , Up: expander lexenv prim   [Index]


15.3.4.7 Primitive syntactic bindings: core object–type names

A syntactic binding representing the built–in Scheme object–types defined by the boot image has descriptor with format:

($core-type-name
  . #(?type-name ?uid-symbol ?parent-name
      ?constructor-name ?type-predicate-name
      ?equality-predicate-name ?comparison-procedure-name
      ?hash-function-name
      ?type-descriptor-name ?methods-avector))

where the values are:

?type-name

A symbol representing the type name. For example <fixnum>.

?uid-symbol

A unique symbol associated with this object–type.

?parent-name

A symbol representing the parent type of this type, or #f if this type has no parent.

?constructor-name

Either: a symbol representing the public name of this object–type’s constructor function (for example <vector> has vector as constructor); #f if this object–type has no constructor; #t if this object–type has no constructor but the syntax new is used to validate an already built value:

(new <fixnum> 1)        ⇒ 1
(new <fixnum> "ciao")   error→ invalid value
?type-predicate-name

A symbol representing the public name of the object–type’s type predicate function, or #f if this type has no type predicate.

?equality-predicate-name

A symbol representing the public name of the object–type’s equality predicate function, or #f if this type has no equality predicate.

?comparison-procedure-name

A symbol representing the public name of the object–type’s equality procedure, or #f if this type has no equality procedure.

?hash-function-name

A symbol representing the public name of the object–type’s hash function, or #f if this type has no hash function.

?type-descriptor-name

A symbol representing the public name of the object–type’s run–time type descriptor; for example <fixnum> has <fixnum>-ctd (where ‘ctd’ stands for Core Type Descriptor).

?methods-avector

An association vector having symbols as both keys and values:

#((?method-name . ?method-implementation-procedure) ...)

where each key is the name of an object–type’s method and each value is the public name of the method’s implementation procedure.


Next: , Previous: , Up: expander lexenv prim   [Index]