(index ("define-class" 0) ("define=>" 619) ("lambda=>" 940) ("with-instance" 1148) ("import-instance" 1510))
(def (sig (syntax "(define-class NAME FIELD-FORM ...)" (id define-class))) (p "Defines a type class named " (tt "NAME") ", where " (tt "FIELD-FORM ...") " defines one or more fields for instances of this class. " (tt "FIELD-FORM") " should be of the form:") (pre " FIELD-FORM = FIELD-LABEL | (SUPERCLASS-NAME FIELD-LABEL)") (p (tt "SUPERCLASS-NAME") " is the name of a class from which the field is inherited.") (p "The result of this macro is the creation of a constructor with name of the form " (tt "MAKE-CLASSNAME") ", which in turn takes an instance constructor procedure and applies to the given field values."))
(def (sig (syntax "(define=> (<PROCEDURE-NAME> <CLASS-FORM> ...) . BODY)" (id define=>))) (p "Defines a procedure such that all fields of the given class(es) are visible in the scope of the procedure body.") (p (tt "CLASS-FORM") " is of the following form:") (pre "CLASS-FORM = CLASS-NAME | (CLASS-NAME PREFIX-SYMBOL)"))
(def (sig (syntax "(lambda=> (<CLASS-FORM> ...) . BODY)" (id lambda=>))) (p "Anonymous procedure such that all fields in the superclasses of the given class are visible in the scope of the procedure body."))
(def (sig (syntax "(with-instance (<INSTANCE-FORM> ...) . BODY)" (id with-instance))) (p "An expression such that all fields of the given class(es) are visible in the scope of " (tt "BODY") ".") (p (tt "INSTANCE-FORM") " is of the following form:") (pre " INSTANCE-FORM = (CLASS-NAME INSTANCE-EXPR)\n                | (CLASS-NAME INSTANCE-EXPR PREFIX-SYMBOL)"))
(def (sig (syntax "(import-instance <INSTANCE-FORM> ...)" (id import-instance))) (p "Imports all fields of the given classes as identifiers in the current scope."))
