Page 209 Table of Contents Index Page 211
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 23. PRESENTATION TYPES

 
 (define-presentation-type-abbreviation octal-integer (&optional low high)
     `((integer ,low ,high) :base 8 :description "octal integer"))
None of the arguments, except equivalent-type, is evaluated.

=> expand-presentation-type-abbreviation-1 type &optional env [Function]
If the presentation type specifier type is a presentation type abbreviation, or is an and, or,
sequence, or sequence-enumerated that contains a presentation type abbreviation, then this
expands the type abbreviation once, and returns two values, the expansion and t. If type is not
a presentation type abbreviation, then the values type and nil are returned.

env is a macro-expansion environment, as in macroexpand.

=> expand-presentation-type-abbreviation type &optional env [Function]
expand-presentation-type-abbreviation is like expand-presentation-type-abbreviation-
1
, except that type is repeatedly expanded until all presentation type abbreviations have been
removed.

23.3.3 Presentation Methods

Presentation methods inherit and combine in the same way as ordinary CLOS methods. The
reason presentation methods are not exactly the same as ordinary CLOS methods revolves
around the type argument. The parameter specializer for type is handled in a special way,
and presentation method inheritance "massages" the type parameters and options seen by each
method. For example, consider three types int, rrat, and num defined as follows:

Minor issue: How are massaged arguments passed along? Right now, we pass along those
parameters of the same name, and no others. | SWM


 (define-presentation-type int (low high)
   :inherit-from `(rrat ,high ,low))

 (define-presentation-method presentation-typep :around (object (type int))
   (and (call-next-method)
        (integerp object)
        (<= low object high)))

 (define-presentation-type rrat (high low)
     :inherit-from `num)

 (define-presentation-method presentation-typep :around (object (type rrat))
   (and (call-next-method)
        (rationalp object)
        (<= low object high)))


Page 209 Table of Contents Index Page 211
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E