(index ("datatypes" 0) ("define-concrete-type" 194) ("concrete-case" 488) ("define-abstract-type" 1065) ("define-object-type" 1664) ("make-base-object" 2283) ("object?" 2508) ("Types" 2603) ("Info" 2719) ("Invariant" 2885) ("Ancestors" 3042))
(def (sig (procedure "(datatypes sym ..)" (id datatypes))) (p "shows the list of available exported symbols of the module when called without argument or the signature of that very argument."))
(def (sig (syntax "(define-concrete-type TYPE type? (Constructor (arg arg? ...) ...) ....)" (id define-concrete-type))) (p "defines a concrete type TYPE withe type predicate type? and with variant constructors Constructor ...., whose arguments arg ... are checked by arg? ...  respectively."))
(def (sig (syntax "(concrete-case (obj type?) ((Constructor arg ...) xpr ....) ....  (else xpr ....) ..)" (id concrete-case))) (p "the one macro which replaces in concrete datatypes the many accessor routines by destructuring the Constructors' arguments via pattern matching. The macro checks first, if obj passes the type? test and then tries to match obj against the variant constructors, invoking the body of the first matching one. This body xpr . xprs has access to the constructor's arguments arg ... Note, that the syntax of concrete-case differs from that of cases."))
(def (sig (syntax "(define-abstract-type TYPE type? (Constructor (arg arg? ...) ...) ....  (with ((proc arg ...) xpr ....) ....) (printer (lambda (obj out) xpr ....)) ..  (reader proc) ..)" (id define-abstract-type))) (p "like define-concrete-type, but the variant constructors Constructor .... are hidden and procedures (proc arg ...) .... are exported instead. Only those procedures have access to the variant constructors. printers and readers are optional, but they need access to the variant constructors, so they must be defined here. They use define-record-printer and define-reader-ctor."))
(def (sig (syntax "(define-object-type CHILD child? make-child ((parent parent?) (z z? ...) ...) (override  ((A a ...) apr ...) ...) ((X (x x? ...) ...) xpr ...) ....)" (id define-object-type))) (p "exports a constructor, (make-child parent z ...), a predicate, child?, as well as messages (X x ...) ... with body xpr ..., whose arguments x are checked by preconditions x? ...") (p "The constructor's argunemts are checked by parent? and z? ... respectively.") (p "In the override clause signatures (A a ...) and overridden bodies apr apr ...  of messages already exported and argment-checked by a parent are given."))
(def (sig (procedure "(make-base-object)" (id make-base-object))) (p "creates the base object, which exports the messages (Types), (Info), (Invariant) and (Ancestors), which will be automatically overridden in each child."))
(def (sig (procedure "(object? xpr)" (id object?))) (p "the type predicate for all objects."))
(def (sig (procedure "(Types)" (id Types))) (p "passing this message to an object will print its type hierarchy."))
(def (sig (procedure "(Info)" (id Info))) (p "passing this message to an object will print the documentation of all exported messages including its preconditions."))
(def (sig (procedure "(Invariant)" (id Invariant))) (p "passing this message to an object will print its invariant or #f, hence can be used as predicate."))
(def (sig (procedure "(Ancestors)" (id Ancestors))) (p "passing this message to an object will list the ancestors of the object."))
