The polymorphic-functions Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The polymorphic-functions Reference Manual

This is the polymorphic-functions Reference Manual, version 0.2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Sep 15 05:53:15 2022 GMT+0.

Table of Contents


1 Introduction

* About
  :PROPERTIES:
  :CUSTOM_ID: polymorphic-functions
  :END:

#+BEGIN_QUOTE
  This library is still unstable, albeit the main interface comprising of the below symbols hasn't changed in at least the last six months. Users are also recommended to avoid non-trivial uses of &rest type-lists:

  - define-polymorphic-function
  - undefine-polymorphic-function
  - defpolymorph
  - defpolymorph-compiler-macro
  - undefpolymorph
  - find-polymorph
  - polymorph-apropos-list-type
#+END_QUOTE

The library provides all of

- [[https://en.wikipedia.org/wiki/Ad_hoc_polymorphism][Ad hoc polymorphism]] and
- [[https://en.wikipedia.org/wiki/Subtyping][Subtype Polymorphism]]
- [[https://en.wikipedia.org/wiki/Parametric_polymorphism][Parametric Polymorphism]] (in a very limited sense; see [[https://www.reddit.com/r/lisp/comments/qmrycl/comment/hjd3rkc/?utm_source=share&utm_medium=web2x&context=3][the discussion here]]!)

to dispatch on the basis of types rather than classes. Compile-time dispatch is also provided but this requires support for CLTL2 through [[https://github.com/alex-gutev/cl-environments][cl-environments]]. In addition, [[#and-about-extended-types][extended types]] are also provided through two means:

1. [[https://github.com/s-expressionists/ctype/][ctype]], and the system =polymorphic-functions=
2. [[https://github.com/digikar99/extensible-compound-types][extensible-compound-types]], recommended usage is =(cl:pushnew :extensible-compound-types cl:*features*)= and then =(asdf:compile-system ... :force t)=. You may optionally need to recompile dependencies, and it might be recommendable to force compile "extensible-compound-types" itself, so that others are recompiled automagically.

The library was primarily made to dispatch on specialized-arrays for use in [[https://github.com/digikar99/numericals][numericals]], since CLHS does not enable generic-functions for specialized-arrays. But has also been put to use in [[https://github.com/lisp-polymorph/][lisp-polymorph]].

See also: [[#thank-you-so-much-are-there-any-pitfalls-i-need-to-be-aware-of-while-using-pf][pitfalls]].

* Table of Contents
:PROPERTIES:
:TOC: :include all
:END:

:CONTENTS:
- [[#about][About]]
- [[#table-of-contents][Table of Contents]]
- [[#usage][Usage]]
  - [[#basic-usage][Basic Usage]]
    - [[#examples][Examples]]
  - [[#libraries--projects-currently-using-polymorphic-functions][Libraries / Projects currently using polymorphic-functions]]
  - [[#static-dispatch--inline-optimizations][Static Dispatch / Inline Optimizations]]
  - [[#discussion-and-advanced-usage][Discussion and Advanced Usage]]
    - [[#wait-doesnt-pfs-use-of-aot-imply-2500-specialized-variants-as-sf-says][Wait, doesn't pf's use of AOT imply 2500 specialized variants as sf says?]]
    - [[#but-what-about-inline-induced-code-bloat][But, what about inline induced code-bloat?]]
    - [[#that-sounds-bad-isnt-there-a-best-of-both-worlds][That sounds bad; isn't there a "best of both worlds"?]]
    - [[#well-thats-awesome-what-else-can-you-do-with-polymorphic-functions][Well, that's awesome! What else can you do with polymorphic-functions?]]
    - [[#could-you-elaborate-a-bit-more-on-parametric-polymorphism][Could you elaborate a bit more on parametric-polymorphism?]]
    - [[#and-about-extended-types][And about extended types?]]
    - [[#erm-about-the-polymorphs-themselves-is-there-a-notion-of-specificity-of-type-lists--polymorphs][Erm, about the polymorphs themselves, is there a notion of specificity of type-lists / polymorphs?]]
    - [[#that-looks-cool-is-there-more-comparison-against-generic-functions-and-specialization-store][That looks cool. Is there more comparison against generic-functions and specialization-store?]]
    - [[#like-generic-functions-and-methods-do-polymorphic-functions-play-nice-with-slimeswank][Like generic-functions and methods, do polymorphic-functions play nice with slime/swank?]]
    - [[#thank-you-so-much-are-there-any-pitfalls-i-need-to-be-aware-of-while-using-pf][Thank you so much! Are there any pitfalls I need to be aware of while using pf?]]
- [[#dependencies-outside-quicklisp][Dependencies outside quicklisp]]
  - [[#getting-it-from-ultralisp][Getting it from ultralisp]]
  - [[#getting-it-from-clpm][Getting it from clpm]]
- [[#tests][Tests]]
- [[#related-projects][Related Projects]]
- [[#acknowledgements][Acknowledgements]]
:END:

* Usage
   :PROPERTIES:
   :CUSTOM_ID: usage
   :END:

** Basic Usage
    :PROPERTIES:
    :CUSTOM_ID: basic-usage
    :END:

- Users are expected to define a =polymorphic-function= (analogous to =cl:generic-function=) with one or more =polymorph= (similar to =cl:method=). These may be dispatched at runtime or at compile time if optimization policy is ~(and (= speed 3) (/= debug 3))~ abbreviated as  =optim-speed=.
- Adhoc Polymorphism is supported in the sense that different polymorphs can have different implementations.
- Subtype Polymorphism is supported in the sense that once a polymorph is defined, then when a call to it is being compiled, then the type declarations inside the lambda-body of the polymorph are enhanced using the more specific type declarations in the environment. Thus, a
  polymorph that was defined for =vector= when compiled with arguments declared to be =simple-string=, then the body is made aware at /compiler/macroexpansion time/ that the arguments are actually =simple-string= rather than just =vector=. Code further in the succeeding compiler/macroexpansion phases can then make use of this information. This requires that the parameters to the polymorph be treated as read-only variables; otherwise the consequences can be undefined because code might have been initially written assuming the parameter/variable to be a =vector= and not merely a =simple-string=. 
- Individual polymorphs may also additionally have compiler macros. However, the policy under which these may be invoked is undefined. In essence, user code must not rely on compiler macros for /correctness/.
- See [[#discussion-and-advanced-usage][Discussion and Advanced Usage]] for parametric polymorphism. Adhoc and Subtype polymorphisms should suffice in most cases for optimization; parametric polymorphism can aid in further type safety.

*** Examples
     :PROPERTIES:
     :CUSTOM_ID: examples
     :END:

See [[file:src/misc-tests.lisp]] for some more examples.

#+BEGIN_SRC lisp
  (use-package :polymorphic-functions)
  (define-polymorphic-function my= (a b))
  (defpolymorph my= ((a string) (b string)) boolean
    (string= a b))
  (defpolymorph my= ((a character) (b character)) boolean
    (char= a b))
  (defpolymorph my= ((a (simple-array single-float))
                     (b (simple-array single-float))) symbol
    ;; possible here; not possible with cl:defmethod without some MOP-fu
    ;; do something
    'hello)
#+END_SRC

#+BEGIN_SRC lisp
  CL-USER> (defun foo (a b)
             (declare (optimize speed)
                      (type string a b))
             (string= a b))

  FOO
  CL-USER> (disassemble 'foo)
  ; disassembly for FOO
  ; Size: 39 bytes. Origin: #x5300D1B3                          ; FOO
  ; B3:       31F6             XOR ESI, ESI
  ; B5:       48C745F017011050 MOV QWORD PTR [RBP-16], #x50100117  ; NIL
  ; BD:       488975E8         MOV [RBP-24], RSI
  ; C1:       48C745E017011050 MOV QWORD PTR [RBP-32], #x50100117  ; NIL
  ; C9:       B90C000000       MOV ECX, 12
  ; CE:       FF7508           PUSH QWORD PTR [RBP+8]
  ; D1:       B8E25A3550       MOV EAX, #x50355AE2              ; #
  ; D6:       FFE0             JMP RAX
  ; D8:       CC10             INT3 16                          ; Invalid argument count trap
  NIL
  CL-USER> (defun bar (a b)
             (declare (optimize speed)
                      (type string a b))
             (my= a b))
  BAR
  CL-USER> (disassemble 'bar)
  ; disassembly for BAR
  ; Size: 39 bytes. Origin: #x5300D283                          ; BAR
  ; 83:       31F6             XOR ESI, ESI
  ; 85:       48C745F017011050 MOV QWORD PTR [RBP-16], #x50100117  ; NIL
  ; 8D:       488975E8         MOV [RBP-24], RSI
  ; 91:       48C745E017011050 MOV QWORD PTR [RBP-32], #x50100117  ; NIL
  ; 99:       B90C000000       MOV ECX, 12
  ; 9E:       FF7508           PUSH QWORD PTR [RBP+8]
  ; A1:       B8E25A3550       MOV EAX, #x50355AE2              ; #
  ; A6:       FFE0             JMP RAX
  ; A8:       CC10             INT3 16                          ; Invalid argument count trap
  NIL
  CL-USER> (my= (make-array 1 :element-type 'single-float)
                (make-array 1 :element-type 'single-float))
  HELLO
  CL-USER> (defun baz (a b)
             (declare (type string a)
                      (type integer b)
                      (optimize safety))
             (my= a b))
  ; While compiling
  ;     (MY= A B)
  ;   Following notes were encountered:
  ;
  ;     No applicable POLYMORPH discovered for polymorphic-function
  ;       MY=
  ;     and ARG-LIST:
  ;
  ;       (A B)
  ;
  ;     derived to be of TYPES:
  ;
  ;       (STRING INTEGER)
  ;
  ;     Available Effective-Type-Lists include:
  ;
  ;       (STRING STRING)
  ;       (CHARACTER CHARACTER)
  ;       ((SIMPLE-ARRAY SINGLE-FLOAT) (SIMPLE-ARRAY SINGLE-FLOAT))
  BAZ
  CL-USER> (my= 5 "hello")
  ; Evaluation aborted on #.
#+END_SRC

** Libraries / Projects currently using polymorphic-functions
    :PROPERTIES:
    :CUSTOM_ID: libraries-projects-currently-using-polymorphic-functions
    :END:

- [[https://github.com/digikar99/abstract-arrays][abstract-arrays]] and [[https://github.com/digikar99/dense-numericals/][dense-arrays]]
- [[https://github.com/digikar99/numericals/][numericals]]:
  this makes extensive use of subtype polymorphism to avoid code
  repetition in the /packaged/ provided code, cutting down on initial
  compile times.
- [[https://github.com/lisp-polymorph/][lisp-polymorph]] with currently working
  - [[https://github.com/lisp-polymorph/polymorph.maths][polymorph.maths]]
  - [[https://github.com/lisp-polymorph/polymorph.access][polymorph.access]]
  - [[https://github.com/lisp-polymorph/polymorph.copy-cast][polymorph.copy-cast]]
  - and more...

** Static Dispatch / Inline Optimizations
    :PROPERTIES:
    :CUSTOM_ID: static-dispatch-inline-optimizations
    :END:

A compiler-note-providing compiler-macro has also been provided for compile-time optimization guidelines.

- A speed=3 optimization coupled with debug<3 optimization results in (attempts to) static-dispatch. This is done using by f-binding gentemps to appropriate function objects.
- Inline optimization may also be provided by =(declare (inline-pf my-polymorph))= or supplying =:inline t= (default) or =:inline :maybe= option in the =name= field of =defpolymorph= form.
- static-dispatch can be avoided by declaring/declaiming the polymorphic-function to be =cl:notinline=. Globally, static-dispatch can be disabled by setting =*disable-static-dispatch*= to non-NIL.

It is up to the user to ensure that a polymorph that specializes (or generalizes) another polymorph should have the same behavior, under the appropriate definition of same-ness.

For instance, consider

#+BEGIN_SRC lisp
  (define-polymorphic-function my-type (obj))
  (defpolymorph my-type ((obj vector)) symbol
    (declare (ignore obj))
    'vector)
  (defpolymorph my-type ((obj string)) symbol
    (declare (ignore obj))
    'string)
#+END_SRC

Then, the behavior of =my-type-caller= depends on optimization policies:

#+BEGIN_SRC lisp
  (defun my-type-caller (a)
    (declare (optimize debug))
    (my-type a))
  (my-type-caller "hello") ;=> STRING

  ;;; VS

  (defun my-type-caller (a)
    (declare (optimize speed)
             (type vector a))
    (my-type a))
  (my-type-caller "hello") ;=> VECTOR
#+END_SRC

The mistake here is polymorph with type list =(vector)= produces a different behavior as compared to polymorph with type list =(string)=. (The behavior is "same" in the sense that ="hello"= is indeed a =vector=; perspective matters?)

This problem also arises with [[https://github.com/alex-gutev/static-dispatch][static-dispatch]] and [[https://github.com/guicho271828/inlined-generic-function][inlined-generic-functions]]. The way to avoid it is to either maintain discipline on the part of the user (the way polymorphic-functions [currently] assumes) or to seal domains (the way of fast-generic-functions and sealable-metaobjects).

Inlining especially becomes necessary for mathematical operations, wherein a call to =generic-+= on SBCL can be a 3-10 times slower than the optimized calls to =fixnum += or =single-float += etc. =generic-cl= (since =static-dispatch= version 0.5) overcomes this on SBCL by using =sb-c:deftransform=; for portable projects, one could use =inlined-generic-functions= [superseded by =fast-generic-functions=] subject to the limitation that there are no separate classes for (array single-float) and (array double-float) at least until SBCL 2.1.1.

** Discussion and Advanced Usage
    :PROPERTIES:
    :CUSTOM_ID: advanced-usage
    :END:

The library was primarily made to dispatch on specialized-arrays for use in [[https://github.com/digikar99/numericals][numericals]], since CLHS does not enable generic-functions for specialized-arrays. Compile-time static-dispatch is provided through the use of compiler-macros and CLTL2 environment API in conjunction with [[https://github.com/alex-gutev/cl-form-types][cl-form-types]].

TODO: Answer What's wrong with typecase? if anything other than non-extensibility.

The closest pre-existing library to polymorphic-functions at the time of writing is
- [[https://github.com/numcl/specialized-function][specialized-function]]: sf has a JIT philosophy, while pf has a AOT philosophy
- [[https://github.com/cosmos72/cl-parametric-types][cl-parametric-types]]: I'm not a fan of the calling syntax for cl-parametric-types

*** Wait, doesn't pf's use of AOT imply 2500 specialized variants as sf says?

Thanks to [[https://en.wikipedia.org/wiki/Subtyping][Subtype Polymorphism]], pf's use of AOT can handle this without so many variants.

#+BEGIN_SRC lisp
  (defun dot-original (a b c)
    (declare (optimize (speed 3) (debug 0)))
    (loop
      for i below (array-total-size a)
      do (incf c (* (aref a i) (aref b i))))
    c)

  (defun dot-user ()
    (let ((a (make-array 1000000 :element-type 'single-float))
          (b (make-array 1000000 :element-type 'single-float))
          (c 0.0))
      (time (loop repeat 100 do (dot-original a b c)))))

  (defun sf-dot-original (a b c)
    (declare (optimize (speed 3) (debug 0)))
    (specialized-function:specializing (a b c) ()
      (loop
        for i below (array-total-size a)
        do (incf c (* (aref a i) (aref b i))))
      c))

  (defun sf-dot-user ()
    (let ((a (make-array 1000000 :element-type 'single-float))
          (b (make-array 1000000 :element-type 'single-float))
          (c 0.0))
      (time (loop repeat 100 do (sf-dot-original a b c)))))

  (defpolymorph (pf-dot-original :inline t) (a b c) t
    (loop
      for i below (array-total-size a)
      do (incf c (* (aref a i) (aref b i))))
    c)

  (defun pf-dot-user-undeclared ()
    (let ((a (make-array 1000000 :element-type 'single-float))
          (b (make-array 1000000 :element-type 'single-float))
          (c 0.0))
      (time (loop repeat 100 do (pf-dot-original a b c)))))

  (defun pf-dot-user ()
    (let ((a (make-array 1000000 :element-type 'single-float))
          (b (make-array 1000000 :element-type 'single-float))
          (c 0.0))
      (declare (optimize speed)
               (type (simple-array single-float) a b)
               (type single-float c))
      (time (loop repeat 100 do (pf-dot-original a b c)))))

  (defun pf-dot-user-df ()
    (let ((a (make-array 1000000 :element-type 'double-float))
          (b (make-array 1000000 :element-type 'double-float))
          (c 0.0d0))
      (declare (optimize speed)
               (type (simple-array double-float) a b)
               (type double-float c))
      (time (loop repeat 100 do (pf-dot-original a b c)))))
#+END_SRC

And the results:

#+begin_src lisp
POLYMORPHIC-FUNCTIONS> (dot-user)
Evaluation took:
  3.108 seconds of real time
  0 bytes consed
POLYMORPHIC-FUNCTIONS> (sf-dot-user)
Evaluation took:
  0.192 seconds of real time
  392,832 bytes consed
POLYMORPHIC-FUNCTIONS> (sf-dot-user)
Evaluation took:
  0.236 seconds of real time
  0 bytes consed
POLYMORPHIC-FUNCTIONS> (pf-dot-user-undeclared)
Evaluation took:
  3.248 seconds of real time
  0 bytes consed
POLYMORPHIC-FUNCTIONS> (pf-dot-user)
Evaluation took:
  0.236 seconds of real time
  0 bytes consed
POLYMORPHIC-FUNCTIONS> (pf-dot-user-df)
Evaluation took:
  0.248 seconds of real time
  0 bytes consed
#+end_src

*** But, what about =inline= induced code-bloat?

Unfortunately, that is a thing. However, consider this. (And correct me if I'm wrong!) If sf is enclosed inside a non-inline function, then there is always going to be a runtime dispatch overhead associated with it. An illustration:

#+BEGIN_SRC lisp
  (defun sf-dot-user-small ()
    (let ((a (make-array 1000 :element-type 'single-float))
          (b (make-array 1000 :element-type 'single-float))
          (c 0.0))
      (time (loop repeat 100000 do (sf-dot-original a b c)))))

  (defun pf-dot-user-small ()
    (let ((a (make-array 1000 :element-type 'single-float))
          (b (make-array 1000 :element-type 'single-float))
          (c 0.0))
      (declare (optimize speed)
               (type (simple-array single-float) a b)
               (type single-float c))
      (time (loop repeat 100000 do (pf-dot-original a b c)))))

  POLYMORPHIC-FUNCTIONS> (sf-dot-user-small)
  Evaluation took:
    0.247 seconds of real time
    0 bytes consed
  POLYMORPHIC-FUNCTIONS> (pf-dot-user-small)
  Evaluation took:
    0.183 seconds of real time
    0 bytes consed
#+END_SRC

In essence: if you enclose, you will have runtime dispatch overhead.

*** That sounds bad; isn't there a "best of both worlds"?

One observation that might sound useful is the following: the faster the code, the costlier the runtime dispatch. Indeed, no one has forced you to use sf /exor/ pf. You can use both. pf works best for faster/smaller code when dispatch is costly. While sf works best with slower/larger code, when runtime dispatch overhead is insignificant. Thus, what you can have is the following:

#+BEGIN_SRC lisp
  (defun sf-pf-dot-original-100 (a b c)
    (specialized-function:specializing (a b c) ()
      (declare (optimize speed))
      (loop repeat 100 do (pf-dot-original a b c))
      c))

  (defun sf-pf-dot-original-100000 (a b c)
    (specialized-function:specializing (a b c) ()
      (declare (optimize speed))
      (loop repeat 100000 do (pf-dot-original a b c))
      c))

  (defun sf-pf-dot-user ()
    (let ((a (make-array 1000000 :element-type 'single-float))
          (b (make-array 1000000 :element-type 'single-float))
          (c 0.0))
      (time (sf-pf-dot-original-100 a b c))))

  (defun sf-pf-dot-user-small ()
    (let ((a (make-array 1000 :element-type 'single-float))
          (b (make-array 1000 :element-type 'single-float))
          (c 0.0))
      (time (sf-pf-dot-original-100000 a b c))))

  ;; After initial few runs when JIT overhead is taken care of
  POLYMORPHIC-FUNCTIONS> (sf-pf-dot-user)
  Evaluation took:
    0.236 seconds of real time
    0 bytes consed
  POLYMORPHIC-FUNCTIONS> (sf-pf-dot-user-small)
  Evaluation took:
    0.180 seconds of real time
    0 bytes consed
#+END_SRC

*** Well, that's awesome! What else can you do with polymorphic-functions?

In addition to [[https://en.wikipedia.org/wiki/Subtyping][Subtype Polymorphism]], [[https://en.wikipedia.org/wiki/Parametric_polymorphism][Parametric Polymorphism]] is provided as well. While subtype polymorphism helps with performance, parametric-polymorphism helps with type-safety, in addition to performance. However, given the limitations of CL, this can be a fair bit limited. See [[https://www.reddit.com/r/lisp/comments/qmrycl/comment/hjd3rkc/?utm_source=share&utm_medium=web2x&context=3][u/stylewarning's comments here]].

Support for extended-types is also provided through [[https://github.com/s-expressionists/ctype][ctype]].

Note that both these are declared to be much more experimental than polymorphic-functions themselves; and it seems they will be that way for a while.

Equally experimental is the support provided for parametric polymorphism through [[https://github.com/digikar99/extensible-compound-types][extensible-compound-types]]. An example is provided in the documentation [[https://github.com/digikar99/extensible-compound-types#parametric-types][there]].

*** Could you elaborate a bit more on parametric-polymorphism?

Sure!

In addition to subtype-polymorphism described above (under [[#basic-usage][Basic Usage]]), PF also provides support for parametric-polymorphism. If you are not using [[https://github.com/digikar99/extensible-compound-types][extensible-compound-types]], this does not provide user-defined parametric types. In fact, sane user-defined parametric-types might be impossible in Common Lisp. What this merely allows for (in the absence of =extensible-compound-types=) then is parametric-polymorphism on functions aka polymorphs for /existing/ parametric-types. The interface for this is through the following symbols:

- \*parametric-type-symbol-predicates\*
- parametric-type-run-time-lambda-body
- parametric-type-compile-time-lambda-body
- %deparameterize-type

An example for this is at [[file:src/extended-types/parametric-types.lisp#L135][src/extended-types/parametric-types.lisp]] and [[file:src/misc-tests.lisp#L496][src/misc-tests.lisp]].

#+BEGIN_SRC lisp
  CL-USER> (use-package :polymorphic-functions)
  T
  CL-USER> (setq *parametric-type-symbol-predicates*
                 (list (lambda (s)
                         (let* ((name (symbol-name s))
                                (len  (length name)))
                           (and (char= #\< (elt name 0))
                                (char= #\> (elt name (1- len))))))))
  (#)

  CL-USER> (defpolymorph foo ((a (array ))) 
             (aref a 0))
  FOO
  CL-USER> (disassemble (lambda (a)
                          (declare (optimize speed)
                                   (type (simple-array single-float 1) a))
                          (aref a 0)))
  ; disassembly for (LAMBDA (A))
  ; Size: 38 bytes. Origin: #x53A49A5C                          ; (LAMBDA (A))
  ; 5C:       48837AF900       CMP QWORD PTR [RDX-7], 0
  ; 61:       7618             JBE L0
  ; 63:       F30F104201       MOVSS XMM0, [RDX+1]
  ; 68:       660F7EC2         MOVD EDX, XMM0
  ; 6C:       48C1E220         SHL RDX, 32
  ; 70:       80CA19           OR DL, 25
  ; 73:       488BE5           MOV RSP, RBP
  ; 76:       F8               CLC
  ; 77:       5D               POP RBP
  ; 78:       C3               RET
  ; 79:       CC10             INT3 16                          ; Invalid argument count trap
  ; 7B: L0:   CC24             INT3 36                          ; INVALID-VECTOR-INDEX-ERROR
  ; 7D:       08               BYTE #X08                        ; RDX
  ; 7E:       82808010         BYTE #X82, #X80, #X80, #X10      ; 0
  NIL
  CL-USER> (disassemble (lambda (a)
                          (declare (optimize speed)
                                   (type (simple-array single-float 1) a))
                          (foo a)))
  ; disassembly for (LAMBDA (A))
  ; Size: 38 bytes. Origin: #x53A49B0C                          ; (LAMBDA (A))
  ; 0C:       48837AF900       CMP QWORD PTR [RDX-7], 0
  ; 11:       7618             JBE L0
  ; 13:       F30F104201       MOVSS XMM0, [RDX+1]
  ; 18:       660F7EC2         MOVD EDX, XMM0
  ; 1C:       48C1E220         SHL RDX, 32
  ; 20:       80CA19           OR DL, 25
  ; 23:       488BE5           MOV RSP, RBP
  ; 26:       F8               CLC
  ; 27:       5D               POP RBP
  ; 28:       C3               RET
  ; 29:       CC10             INT3 16                          ; Invalid argument count trap
  ; 2B: L0:   CC24             INT3 36                          ; INVALID-VECTOR-INDEX-ERROR
  ; 2D:       08               BYTE #X08                        ; RDX
  ; 2E:       82808010         BYTE #X82, #X80, #X80, #X10      ; 0
  NIL

  CL-USER> (defpolymorph my-add ((a (array  ())) (b (array  ())))
               (array  ())
             (let ((out (make-array  :element-type )))
               (loop :for i below 
                     :do (setf (aref out i)
                               (+ (aref a i)
                                  (aref b i))))
               out))
  MY-ADD
  CL-USER> (my-add #(0 1) #(1 2)) ; no compilation necessary for usage
  #(1 3)
  CL-USER> (my-add #(0 1) (make-array 2 :element-type 'single-float
                                      :initial-contents '(3.0 4.0)))
  ; Evaluation aborted on #.
  CL-USER> (my-add (make-array 2 :element-type 'single-float
                                 :initial-contents '(3.0 4.0))
                   (make-array 2 :element-type 'single-float
                                 :initial-contents '(3.0 4.0)))
  #(6.0 8.0)
  CL-USER> (type-of *)
  (SIMPLE-ARRAY SINGLE-FLOAT (2))

  ;;; NOTE that the type-parameters cannot be further used in an unevaluated context
  CL-USER> (defpolymorph foo ((a (array ))) 
             (the  (aref a 0)))
  ; WARNING that  is an undefined type
#+END_SRC

TODO (perhaps?): Ping/PR [[https://github.com/numcl/gtype][gtype]] for
compile time optimization.

*** And about extended types?

There is a =polymorphic-functions.extended-types= package (not system!) that provides types based on [[https://github.com/s-expressionists/ctype][ctype]]. This allows one to extend the CL type system beyond what is possible with =cl:deftype=.

An example for this is the =(supertypep TYPE)= type at
[[file:src/extended-types/supertypep.lisp]].

- In essence, =(supertypep TYPE)= is the set of all type-specifiers that are a supertype of =TYPE=.
- Thus, =(typep 'array '(supertypep vector))= holds.
- In addition, if one were to =(deftype 1d-array () 'vector)= then =(typep '1d-array '(supertypep vector))= would also hold.

Another example of the usage for this is ~(type= TYPE)~ at [[file:src/extended-types/type=.lisp]] put to use in [[https://github.com/digikar99/trivial-coerce][trivial-coerce]].

However, these types can only be used inside the type-lists of polymorphs or with the shadowed symbols in the =polymorphic-functions.extended-types= package; they *cannot be used
inside arbitrary CL forms* with =cl:declare=.

*** Erm, about the polymorphs themselves, is there a notion of specificity of type-lists / polymorphs?

In the case of CLOS generic-functions, [[http://clhs.lisp.se/Body/07_ffab.htm][the specificity of methods is determined by the ordering of classes in the class-precedence-list]]. However, an equivalent notion of type-precedence-lists does not make sense. The closest is the subtype relation.

Thus, considering two /applicable/ polymorphs, from left to right, each of the corresponding type-specifier pair has a non-NIL intersection*, or one of them is a subtype of another. The former case is inherently ambiguous in the absence of type-precedence lists, and is detected at compilation time. A continuable error is signalled to help the user handle this case. In the latter case, the polymorph corresponding to the more specialized type in the pair is awarded a higher specificity.

*A trivial example of non-NIL intersection are the types =(or string number)= and =(or string symbol)=.

Thus, for two-argument polymorphs with type-lists containing =array= and =string= have the most-specific-first ordering given by:

#+BEGIN_SRC
(string string)
(string array)
(array  string)
(array  array)
#+END_SRC

The arguments are ordered in the order they are specified in the case of required and optional arguments. For keyword arguments, they are reordered in lexical order.

*** That looks cool. Is there more comparison against generic-functions and specialization-store?

Here we go: so, =polymorphic-function= are implemented using the metaclass =closer-mop:funcallable-standard-class= and =closer-mop:set-funcallable-instance-function=.

As per [[http://www.lispworks.com/documentation/HyperSpec/Body/t_generi.htm#generic-function][CLHS]],

#+BEGIN_QUOTE
  A generic function is a function whose behavior depends on the classes
  or identities of the arguments supplied to it.
#+END_QUOTE

By contrast, polymorphic-functions dispatch on the types of the
arguments supplied to it. This helps dispatching on specialized arrays
as well as user-defined types. Further, the intention of
polymorphic-functions is to provide multiple implementations of a
high-level operation* corresponding to different specializations, the
behavior is supposed to be the "same". "Overriding behavior" makes
more sense for generic functions than with polymorphic-functions.

In contrast to [[https://github.com/marcoheisig/sealable-metaobjects][sealable-metaobjects]] and [[https://github.com/marcoheisig/fast-generic-functions][fast-generic-functions]],
polymorphic-functions does not make any assumptions about the
sealedness of a domain for purposes of inlining. Thus, users are
expected to abide by the same precautions for inline optimizations
here as they do while inlining normal functions. In particular, users
are expected to recompile their code after additional polymorphs are
defined, and also accordingly manage the compilation order of their
files and systems.

IIUC, [[https://github.com/numcl/specialized-function][specialized-function]] provides a JIT variant of parametric
polymorphism. By contrast, PF provides an AOT variant.

A related project [[https://github.com/markcox80/specialization-store][specialization-store]] also provides support for
type-based dispatch:

#+BEGIN_QUOTE
  A premise of specialization store is that all specializations should
  perform the same task. Specializations should only differ in how the
  task is performed. This premise resolves ambiguities that arise when
  using types, rather than classes, to select the most specific
  specialization to apply.
#+END_QUOTE

However, the implications of this assumption are that individual
specializations in each store-object of specialization-store [[https://github.com/markcox80/specialization-store/wiki/Tutorial-2:-Optional,-Keyword-and-Rest-Arguments][do not
have initializer forms for optional or keyword arguments]].

By contrast, like usual generic-functions, PF does allow initializer
forms for optional and keywords arguments for individual polymorphs.

In addition to being dispatched on types, PF also provides the ability
to install compiler-macros for individual =polymorphs=.

The runtime dispatch performance of all the three of
polymorphic-functions, cl:generic-function and specialization-store is
comparable at least for a small number of
polymorphs/methods/specializations.

| Feature                         | cl:generic-function | specialization-store | polymorphic-functions |
|                                 |                     |                      |                       |
|---------------------------------+---------------------+----------------------+-----------------------|
| Method combination              | Yes                 | No                   | No                    |
| Precedence                      | Yes                 | Partial^             | Yes                   |
| &optional, &key, &rest dispatch | No                  | Yes                  | Yes^                  |
| Run-time Speed                  | Fast                | Fast                 | Fast                  |
| Compile-time support            | Partial**           | Yes                  | Yes                   |
| Parametric Polymorphism         | No                  | No                   | Yes                   |

^This is the point about specialization-store having a single common initialization form for all the specializations.

**Using [[https://github.com/marcoheisig/fast-generic-functions][fast-generic-functions]] - but this apparantly has a few limitations like requiring non-builtin-classes to have an additional metaclass. This effectively renders it impossible to use for the classes in already existing libraries. But, there's also [[https://github.com/alex-gutev/static-dispatch][static-dispatch]].

*** Like generic-functions and methods, do polymorphic-functions play nice with slime/swank?

At the moment, SLIME is non-extensible. There is an [[https://github.com/slime/slime/issues/642][open issue here]] about this. Until then, loading =(asdf:load-system "polymorphic-functions/swank")= and calling =(polymorphic-functions::extend-swank)= should get you going. This system essentially is just one file at file:src/swank.lisp.

*** Thank you so much! Are there any pitfalls I need to be aware of while using pf?
    :PROPERTIES:
    :CUSTOM_ID: limitations
    :END:

Yes, there are quite a few:

- *Integration with SLIME* currently works only on SBCL.
- *ANSI is insufficient* for our purposes*: we need
  - CLTL2 environment API: this is used through [[https://github.com/alex-gutev/cl-environments][cl-environments]] (and [[https://github.com/Bike/introspect-environment][introspect-environments]])
    - For *form-type-inference*, polymorphic-functions depends on cl-form-types. Thus, this works as long as cl-form-types succeeds, and [[https://github.com/alex-gutev/cl-form-types][cl-form-types]] does get pretty extensive. In cases wherein it does fail, we also rely on =sb-c:deftransform= on SBCL.
  - [[https://github.com/pcostanza/closer-mop][closer-mop]]; if someone needs a reduced feature version within the bounds of ANSI standard, please raise an issue!
    - A [[https://github.com/Clozure/ccl/pull/369][*bug on CCL*]] may not let PF work as correctly on CCL; subjectively dirty workarounds are possible until it gets fixed.
  - [[https://github.com/s-expressionists/ctype][ctype]]: =typexpand= functionality and =polymorphic-functions.extended-types= package
    - A =polymorphic-functions.extended-types= package (not system!) is also provided based on [[https://github.com/s-expressionists/ctype][ctype]]. This allows one to extend the CL type system to define types beyond what =cl:deftype= can do to some extent. While these *cannot be used inside an arbitrary CL form* with =cl:declare=, these can be used in the type lists of polymorphs. See [[file:src/extended-types/type=.lisp]] for an example put to use in [[https://github.com/digikar99/trivial-coerce][trivial-coerce]].
- The variables used in the *parameters of the polymorphs should be treated as read-only variables*. This is important for inlining with subtype polymorphism, because inlining involves upgrading the declaration of the parameters to the type of the argument declared at the call site, and this type can be more specific than the types of the parameters specified during the compilation of the polymorph itself.
- Static dispatch relies on =policy-quality= working as expected, and compiler-macros being called. As a result, it may not work on all implementations.
- Some implementations produce interpreted functions some times while compiled functions other times; and accordingly differ if or not compiler-macros are called.
- Currently *inlining uses the lexical environment of the call-site*
  rather than the definition-site as is the usual case. To work around
  this, users should avoid shadowing global lexical elements.
- Parametric-polymorphism is in a very limited sense. See [[https://www.reddit.com/r/lisp/comments/qmrycl/comment/hjd3rkc/?utm_source=share&utm_medium=web2x&context=3][the discussion here]] for parametric-types.
- Avoid using =&rest= lambda-lists if you are aiming for stability. The algorithms for heterogeneous-type-lists methods for specialization and ambiguity detection implemented at file:src/lambda-lists/rest.lisp are non-trivial; PRs with more simplistic algorithms would be much welcome :D!
- This library is not meant to compete against [[https://github.com/coalton-lang/coalton/][Coalton]]; because safety-wise, CLHS leaves it unspecified about what happens when the type declared at compile time (using =declare= or =the=) differs from the actual runtime type of the form or variable, compile time safety only exists on implementations that already provide it, and that too to a lesser extent that a fully static language. But on other implementations this is non-existent. However, an effort is certainly made to use the derived/declared types at the polymorph boundaries when compiled with =(debug 3)= or =(safety 3)= to ensure that the runtime types match these declared types, independent of the implementation support.

*If someone would want a reduced-feature ANSI-compatible library, feel free to raise an issue. However, even with ANSI, one needs =cl:subtypep= working correctly, for instance, on Allegro CL 10.1: =(subtypep `(and (or string number) (or string symbol)) nil)= returns =T T=. CI is run on SBCL and ECL.

* Dependencies outside quicklisp
   :PROPERTIES:
   :CUSTOM_ID: dependencies-outside-quicklisp
   :END:

- SBCL 2.0.9+
- [[https://github.com/alex-gutev/cl-form-types][cl-form-types]]
  - [[https://github.com/alex-gutev/cl-environments][cl-environments]]
- [[https://github.com/digikar99/compiler-macro-notes][compiler-macro-notes]]
- and more... better use ultralisp until then!

** Getting it from ultralisp
    :PROPERTIES:
    :CUSTOM_ID: getting-it-from-ultralisp
    :END:

[[https://ultralisp.org/][Ultralisp]] recently added a feature to allow
[[https://github.com/ultralisp/ultralisp/pull/87][custom dists]]. While
quicklisp will take a while to update trivial-types (and cl-syntax which
several other projects depend upon) to the new repositories since the
originals have been archived and trivial-types is still incomplete wrt
CLHS, we can use the custom dists to distribute this (and related)
libraries.

To do this, add the following to your implementation init file (since
you'll possibly need this to keep with the project updates):

#+BEGIN_SRC lisp
  ;;; An attempt was made to include the enumeration function natively at
  ;;;   https://github.com/quicklisp/quicklisp-client/pull/206
  ;;; but it was rejected, so we do this:
  (defun ql-dist::dist-name-pathname (name)
    "Return the pathname that would be used for an installed dist with
  the given NAME."
    (ql-dist::qmerge (make-pathname :directory (list* :relative "dists"
                                               (uiop:split-string name :separator "/")))))
  (defun digikar99-dist-enumeration-function ()
    "The default function used for producing a list of dist objects."
    (loop for file in (directory (ql-dist::qmerge "dists/digikar99/*/distinfo.txt"))
          collect (ql-dist::make-dist-from-file file)))
  (push 'digikar99-dist-enumeration-function ql::*dist-enumeration-functions*)
#+END_SRC

Once the function is pushed, install the dist:

#+BEGIN_SRC lisp
  ;;; See https://ultralisp.org/dists/digikar99/specialized-array-dispatch for related projects
  (ql-dist:install-dist "http://dist.ultralisp.org/digikar99/specialized-array-dispatch.txt"
                        :prompt nil)
  ;;; If the install-dist step gives a "can't create directory" error, manually
  ;;; create the directory $QUICKLISP_HOME/dists/digikar99
  (ql:update-dist "digikar99/specialized-array-dispatch")
  (ql:quickload "polymorphic-functions")
  (asdf:test-system "polymorphic-functions")
#+END_SRC

** Getting it from clpm

Recently, clpm support was also added.

TODO: Elaborate.
* Tests
   :PROPERTIES:
   :CUSTOM_ID: tests
   :END:

Tests are distributed throughout the system. Run
=(asdf:test-system "polymorphic-functions")=.

* Related Projects
   :PROPERTIES:
   :CUSTOM_ID: related-projects
   :END:

- [[https://github.com/alex-gutev/static-dispatch][static-dispatch]]
- [[https://github.com/markcox80/specialization-store][specialization-store]]
- [[https://github.com/marcoheisig/fast-generic-functions][fast-generic-functions]]
- [[https://github.com/guicho271828/inlined-generic-function][inlined-generic-functions]]
- [[https://github.com/numcl/specialized-function][specialized-function]]
- [[https://github.com/numcl/gtype][gtype]]
- [[https://github.com/cosmos72/cl-parametric-types][cl-parametric-types]]

* Acknowledgements
   :PROPERTIES:
   :CUSTOM_ID: acknowledgements
   :END:

- [[https://github.com/alex-gutev/][Alex Gutev]] for an extensive [[https://github.com/alex-gutev/cl-form-types][cl-form-types]]!
- [[https://github.com/commander-trashdin/][Andrew]] for extensively putting polymorphic-functions to test at a brewing project on
  [[https://github.com/lisp-polymorph/][lisp-polymorph]]!


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 polymorphic-functions

Type based dispatch for Common Lisp

Author

<Shubhamkar Ayare (shubhamayare@yahoo.co.in)>

License

MIT

Version

0.2.1

Dependencies
  • alexandria (system).
  • closer-mop (system).
  • compiler-macro-notes (system).
  • extensible-compound-types-cl (system)., for feature :extensible-compound-types
  • ctype (system)., for feature (:not :extensible-compound-types)
  • fiveam (system).
  • cl-form-types (system).
  • introspect-environment (system).
Source

polymorphic-functions.asd.

Child Components

3 Modules

Modules are listed depth-first from the system components tree.


3.1 polymorphic-functions/extended-types

Dependency

package.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Child Components

3.2 polymorphic-functions/lambda-lists

Dependencies
Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


4.1.1 polymorphic-functions/polymorphic-functions.asd

Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

ASDF Systems

polymorphic-functions.


4.1.2 polymorphic-functions/pre-package.lisp

Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Packages

polymorphic-functions.defpackage.

Public Interface

defpackage (macro).


4.1.3 polymorphic-functions/package.lisp

Dependency

pre-package.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Packages
Public Interface

cl-type-specifier-p (function).

Internals

4.1.4 polymorphic-functions/types.lisp

Dependency

package.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Public Interface
Internals

4.1.5 polymorphic-functions/extended-types/parametric-types.lisp

Source

polymorphic-functions.asd.

Parent Component

extended-types (module).

Public Interface
Internals

4.1.6 polymorphic-functions/extended-types/ensure-type-form.lisp

Dependency

parametric-types.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

extended-types (module).

Internals

4.1.7 polymorphic-functions/extended-types/core.lisp

Dependency

parametric-types.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

extended-types (module).

Public Interface
Internals

4.1.8 polymorphic-functions/extended-types/deparameterize-type.lisp

Dependency

parametric-types.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

extended-types (module).

Public Interface

%deparameterize-type (generic function).

Internals

4.1.9 polymorphic-functions/extended-types/supertypep.lisp

Dependency

core.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

extended-types (module).

Public Interface
Internals

4.1.10 polymorphic-functions/extended-types/type=.lisp

Dependency

core.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

extended-types (module).

Public Interface
Internals

4.1.11 polymorphic-functions/extended-types/subtypep.lisp

Dependency

core.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

extended-types (module).

Public Interface
Internals

4.1.13 polymorphic-functions/lambda-lists/parameters.lisp

Source

polymorphic-functions.asd.

Parent Component

lambda-lists (module).

Internals

4.1.14 polymorphic-functions/lambda-lists/base.lisp

Dependencies
Source

polymorphic-functions.asd.

Parent Component

lambda-lists (module).

Internals

4.1.16 polymorphic-functions/lambda-lists/required-optional.lisp

Dependency

base.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

lambda-lists (module).

Internals

4.1.19 polymorphic-functions/polymorphic-function.lisp

Dependencies
Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Public Interface
Internals

4.1.20 polymorphic-functions/conditions.lisp

Dependency

extended-types (module).

Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Public Interface
Internals

4.1.21 polymorphic-functions/compiler-macro.lisp

Dependencies
Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Public Interface

*disable-static-dispatch* (special variable).

Internals

pf-compiler-macro (function).


4.1.22 polymorphic-functions/sbcl-transform.lisp

Dependencies
Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Internals

4.1.23 polymorphic-functions/dispatch.lisp

Dependencies
Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Public Interface
Internals

4.1.24 polymorphic-functions/misc-tests.lisp

Dependency

dispatch.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Internals

4.1.25 polymorphic-functions/benchmark.lisp

Dependency

misc-tests.lisp (file).

Source

polymorphic-functions.asd.

Parent Component

polymorphic-functions (system).

Internals

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 polymorphic-functions.extended-types

Source

package.lisp.

Use List
  • common-lisp.
  • ctype.
Public Interface
Internals

5.2 polymorphic-functions

Source

package.lisp.

Use List
  • alexandria.
  • cl-form-types.
  • common-lisp.
Public Interface
Internals

5.3 polymorphic-functions.nonuser

Package for internal use by POLYMORPHIC-FUNCTIONS not intended for direct use by users.

Source

package.lisp.


5.4 polymorphic-functions.defpackage

Source

pre-package.lisp.

Use List
  • alexandria.
  • common-lisp.
Public Interface

defpackage (macro).


6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Public Interface


Next: , Previous: , Up: Public Interface   [Contents][Index]

6.1.1 Special variables

Special Variable: *compiler-macro-expanding-p*

Bound to T inside the DEFINE-COMPILER-MACRO defined in DEFINE-POLYMORPH

Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Special Variable: *disable-static-dispatch*

If compile-time value is non-NIL, all polymorphic-functions are dispatched dynamically.

Package

polymorphic-functions.

Source

compiler-macro.lisp.

Special Variable: *extended-subtypep-functions*

A list of function-designators that will be called by EXTENDED-SUBTYPEP.

Package

polymorphic-functions.extended-types.

Source

core.lisp.

Special Variable: *parametric-type-symbol-predicates*

A type-specifier in the type-list of a polymorph qualifies as parametric-type-specifier if there exists a symbol in the list, which when tested against the functions (predicates) in this list, returns non-NIL for at least one predicate

Package

polymorphic-functions.

Source

parametric-types.lisp.

Special Variable: *subtypep-alist*

An ALIST mapping a (CONS TYPE1 TYPE2) to a boolean indicating whether TYPE1 is a subtype of TYPE2.

Package

polymorphic-functions.extended-types.

Source

core.lisp.


6.1.2 Macros

Macro: define-polymorphic-function (name untyped-lambda-list &key overwrite documentation default)

Define a function named NAME that can then be used for DEFPOLYMORPH
for specializing on various argument types.

If OVERWRITE is T, all the existing polymorphs associated with NAME are deleted, and new polymorphs will be ready to be installed.
If OVERWRITE is NIL, a continuable error is raised if the LAMBDA-LIST has changed.

DEFAULT should be a FUNCTION that can be called with two arguments at run-time and compile-time in case no polymorph is applicable.
- the first of these arguments is the NAME, while
- the second argument is the argument list with which the polymorphic-function was called or compiled.
At compile-time *COMPILER-MACRO-EXPANDING-P* is bound to non-NIL.

Package

polymorphic-functions.

Source

dispatch.lisp.

Macro: defpackage (package &body options)

Like CL:DEFPACKAGE but provides a (:SHADOWING-IMPORT-EXPORTED-SYMBOLS {package}*) option. Expects such package to be already defined.

Package

polymorphic-functions.defpackage.

Source

pre-package.lisp.

Macro: defpolymorph (name typed-lambda-list return-type &body body)

Expects OPTIONAL or KEY args to be in the form

((A TYPE) DEFAULT-VALUE) or ((A TYPE) DEFAULT-VALUE AP).

- NAME could also be
(NAME &KEY (INLINE T) STATIC-DISPATCH-NAME MORE-OPTIMAL-TYPE-LIST SUBOPTIMAL-NOTE)
- Possible values for INLINE are T, NIL and :MAYBE
- STATIC-DISPATCH-NAME could be useful for tracing or profiling
- SUBOPTIMAL-NOTE and MORE-OPTIMAL-TYPE-LIST are useful for signalling that the POLYMORPH chosen for static-dispatch, inlining, or compiler-macro is not the most optimal. It is recommended that SUBOPTIMAL-NOTE should be the name of a subclass of SUBOPTIMAL-POLYMORPH-NOTE - the condition class should have a slot to accept the TYPE-LIST of the currently chosen POLYMORPH

**Note**:
- INLINE T or :MAYBE can result in infinite expansions for recursive polymorphs.
Proceed at your own risk.
- Also, because inlining results in type declaration upgradation for purposes
of subtype polymorphism, it is recommended to not mutate the variables used
in the lambda list; the consequences of mutation are undefined.

Package

polymorphic-functions.

Source

dispatch.lisp.

Macro: defpolymorph-compiler-macro (name type-list compiler-macro-lambda-list &body body)

Example TYPE-LISTs: (NUMBER NUMBER)
(STRING &OPTIONAL INTEGER) (STRING &KEY (:ARG INTEGER)) (NUMBER &REST)

Package

polymorphic-functions.

Source

dispatch.lisp.


6.1.3 Compiler macros

Compiler Macro: subtypep (type1 type2 &optional env-form)
Package

polymorphic-functions.extended-types.

Source

core.lisp.

Compiler Macro: supertypep (type1 type2 &optional environment)
Package

polymorphic-functions.extended-types.

Source

core.lisp.

Compiler Macro: typep (object type &optional env-form)
Package

polymorphic-functions.extended-types.

Source

core.lisp.


6.1.4 Ordinary functions

Function: cl-type-specifier-p (type-specifier)

Returns true if TYPE-SPECIFIER is a valid type specfiier.

Package

polymorphic-functions.extended-types.

Source

package.lisp.

Function: definitive-subtypep (type1 type2 &optional environment)

Like POLYMORPHIC-FUNCTIONS.EXTENDED-TYPES:SUBTYPEP but uses *SUBTYPEP-ALIST* and *EXTENDED-SUBTYPEP-FUNCTIONS* and when the second value is NIL raises a restartable error to allow the user to specify whether the TYPE1 is
a definite subtype of TYPE2.

While using non-interactively, recommended way is to modify *SUBTYPEP-ALIST* and *EXTENDED-SUBTYPEP-FUNCTIONS* rather than invoking-restarts.

The function-order for determining the SUBTYPEP functions is undefined.

Package

polymorphic-functions.extended-types.

Source

core.lisp.

Function: extended-type-specifier-p (object &optional env)

Returns T if OBJECT is a type specifier implemented using CTYPE and is a tree containing a list starting with an element in *EXTENDED-TYPE-SPECIFIERS*

Package

polymorphic-functions.extended-types.

Source

core.lisp.

Function: find-polymorph (name type-list)

Returns two values:
If a POLYMORPHIC-FUNCTION by NAME does not exist, returns NIL NIL.
If it exists, the second value is T and the first value is a possibly empty list of POLYMORPHs associated with NAME.

Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: no-applicable-polymorph (name env args &optional arg-types)
Package

polymorphic-functions.

Source

conditions.lisp.

Function: polymorph-apropos-list-type (type &key name package)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: polymorphic-function-type-lists (polymorphic-function)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: subtypep (type1 type2 &optional environment)

Like CL:SUBTYPEP but allows PARAMETRIC-TYPE-SPECIFIER as well as EXTENDED-TYPE-SPECIFIERs COMPILER-MACROEXPANDs to CL:SUBTYPEP if both types are constant objects and
neither is a EXTENDED-TYPE-SPECIFIER.

Package

polymorphic-functions.extended-types.

Source

core.lisp.

Function: supertypep (type1 type2 &optional environment)
Package

polymorphic-functions.extended-types.

Source

core.lisp.

Function: type-pair-= (type-pair-1 type-pair-2 &optional env)

Each pair is a CONS of two types.

Package

polymorphic-functions.extended-types.

Source

core.lisp.

Function: type-specifier-p (object &optional env)
Package

polymorphic-functions.extended-types.

Source

core.lisp.

Function: type= (type1 type2 &optional env)
Package

polymorphic-functions.extended-types.

Source

core.lisp.

Function: typep (object type &optional environment)

Like CL:TYPEP but allows TYPE to be a PARAMETRIC-TYPE-SPECIFIER or EXTENDED-TYPE-SPECIFIER. COMPILER-MACROEXPANDs to CL:TYPEP if TYPE is a constant object not a EXTENDED-TYPE-SPECIFIER.

Package

polymorphic-functions.extended-types.

Source

core.lisp.

Function: undefine-polymorphic-function (name)

Remove the POLYMORPH(-WRAPPER) defined by DEFINE-POLYMORPH

Package

polymorphic-functions.

Source

dispatch.lisp.

Function: undefpolymorph (name type-list)

Remove the POLYMORPH associated with NAME with TYPE-LIST

Package

polymorphic-functions.

Source

dispatch.lisp.

Function: upgrade-extended-type (extended-type-specifier &optional env)
Package

polymorphic-functions.extended-types.

Source

core.lisp.


6.1.5 Generic functions

Generic Function: %deparameterize-type (type-specifier-car type-specifier &optional env)

%DEPARAMETERIZE-TYPE is called when the argument to DEPARAMETERIZE-TYPE is a list.

Package

polymorphic-functions.

Source

deparameterize-type.lisp.

Methods
Method: %deparameterize-type ((car (eql function)) fun-type-specifier &optional env)
Method: %deparameterize-type ((car (eql values)) type-specifier &optional env)
Method: %deparameterize-type ((car (eql member)) type-specifier &optional env)
Method: %deparameterize-type ((car (eql eql)) type-specifier &optional env)
Method: %deparameterize-type ((car (eql or)) type-specifier &optional env)
Method: %deparameterize-type ((car (eql and)) type-specifier &optional env)
Method: %deparameterize-type (car-type-specifier type-specifier &optional env)
Generic Function: parametric-type-compile-time-lambda-body (type-car type-cdr parameter)
Package

polymorphic-functions.

Methods
Method: parametric-type-compile-time-lambda-body ((type-car (eql array)) type-cdr parameter)
Source

parametric-types.lisp.

Generic Function: parametric-type-run-time-lambda-body (type-car type-cdr type-parameter)

Users are expected to specialize on the TYPE-CAR using an (EQL symbol) specializer. TYPE-CAR and TYPE-CDR together make up the parametric-type, while TYPE-PARAMETER
is one of the type parameter in the parametric-type.

The methods implemented should return a one-argument lambda-*expression* (not function). The expression will be compiled to a function and called with the appropriate *object* at run-time. The function should return the value of the TYPE-PARAMETER corresponding to the *object* and the parametric type.

Package

polymorphic-functions.

Source

parametric-types.lisp.

Methods
Method: parametric-type-run-time-lambda-body ((type-car (eql array)) type-cdr parameter)

6.1.6 Standalone methods

Method: conjoin/2 ((ct1 ctype=) (ct2 ctype=))
Package

ctype.

Source

type=.lisp.

Method: conjoin/2 ((ct1 csupertypep) (ct2 csupertypep))
Package

ctype.

Source

supertypep.lisp.

Method: ctype= ((ct1 ctype=) (ct2 ctype=))
Package

ctype.

Source

type=.lisp.

Method: ctype= ((ct1 csubtypep) (ct2 csubtypep))
Package

ctype.

Source

subtypep.lisp.

Method: ctype= ((ct1 csupertypep) (ct2 csupertypep))
Package

ctype.

Source

supertypep.lisp.

Method: ctypep (object (ct ctype=))
Package

ctype.

Source

type=.lisp.

Method: ctypep (object (ct csubtypep))
Package

ctype.

Source

subtypep.lisp.

Method: ctypep (object (ct csupertypep))
Package

ctype.

Source

supertypep.lisp.

Method: print-object ((o polymorphic-function) stream)
Source

types.lisp.

Method: print-object ((o polymorph) stream)
Source

types.lisp.

Method: subctypep ((ct1 ctype=) ct2)
Package

ctype.

Source

type=.lisp.

Method: subctypep ((ct1 ctype=) (ct2 (eql #<ctype:conjunction t>)))
Package

ctype.

Source

type=.lisp.

Method: subctypep ((ct1 cmember) (ct2 ctype=))
Package

ctype.

Source

type=.lisp.

Method: subctypep ((ct1 ctype=) (ct2 disjunction))
Package

ctype.

Source

type=.lisp.

Method: subctypep ((ct1 ctype=) (ct2 ctype=))
Package

ctype.

Source

type=.lisp.

Method: subctypep ((ct1 csubtypep) ct2)
Package

ctype.

Source

subtypep.lisp.

Method: subctypep ((ct1 csubtypep) (ct2 (eql #<ctype:conjunction t>)))
Package

ctype.

Source

subtypep.lisp.

Method: subctypep ((ct1 cmember) (ct2 csubtypep))
Package

ctype.

Source

subtypep.lisp.

Method: subctypep ((ct1 csubtypep) (ct2 csubtypep))
Package

ctype.

Source

subtypep.lisp.

Method: subctypep ((ct1 csupertypep) ct2)
Package

ctype.

Source

supertypep.lisp.

Method: subctypep ((ct1 csupertypep) (ct2 (eql #<ctype:conjunction t>)))
Package

ctype.

Source

supertypep.lisp.

Method: subctypep ((ct1 cmember) (ct2 csupertypep))
Package

ctype.

Source

supertypep.lisp.

Method: subctypep ((ct1 csupertypep) (ct2 disjunction))
Package

ctype.

Source

supertypep.lisp.

Method: subctypep ((ct1 csupertypep) (ct2 csupertypep))
Package

ctype.

Source

supertypep.lisp.

Method: unparse ((ct ctype=))
Package

ctype.

Source

type=.lisp.

Method: unparse ((ct csubtypep))
Package

ctype.

Source

subtypep.lisp.

Method: unparse ((ct csupertypep))
Package

ctype.

Source

supertypep.lisp.


6.1.7 Conditions

Condition: more-optimal-polymorph-inapplicable
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses

suboptimal-polymorph-note.

Direct methods

more-optimal-type-list.

Direct slots
Slot: more-optimal-type-list
Initform

(quote (error "more-optimal-type-list not specified"))

Initargs

:more-optimal-type-list

Readers

more-optimal-type-list.

Writers

This slot is read-only.

Condition: no-applicable-polymorph
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses

condition.

Direct subclasses
Direct methods
Direct slots
Slot: name
Initform

(quote (error "name not specified"))

Initargs

:name

Readers

name.

Writers

This slot is read-only.

Slot: args
Initform

(quote (error "args not specified"))

Initargs

:args

Readers

args.

Writers

This slot is read-only.

Slot: arg-types
Initargs

:arg-types

Readers

arg-types.

Writers

This slot is read-only.

Slot: effective-type-lists
Initform

(quote (error "effective-type-lists not specified"))

Initargs

:effective-type-lists

Readers

effective-type-lists.

Writers

This slot is read-only.

Condition: suboptimal-polymorph-note
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses

optimization-failure-note.

Direct subclasses

more-optimal-polymorph-inapplicable.

Direct methods

type-list.

Direct slots
Slot: type-list
Initargs

:type-list

Readers

type-list.

Writers

This slot is read-only.


Next: , Previous: , Up: Public Interface   [Contents][Index]

6.1.8 Structures

Structure: polymorph

- If RUNTIME-APPLICABLE-P-FORM returns true when evaluated inside the lexical environment of the polymorphic-function, then the dispatch is done on LAMBDA. The prioritization
is done by ADD-OR-UPDATE-POLYMORPH so that a more specialized polymorph is checked
for compatibility before a less specialized polymorph.
- The PF-COMPILER-MACRO calls the COMPILER-APPLICABLE-P-LAMBDA with the FORM-TYPEs
of the arguments derived at compile time. The compiler macro dispatches on the polymorph at compile time if the COMPILER-APPLICABLE-P-LAMBDA returns true.

- If this POLYMORPH is used for INLINE-ing or STATIC-DISPATCH and if MORE-OPTIMAL-TYPE-LIST or SUBOPTIMAL-NOTE is non-NIL, then emits a OPTIMIZATION-FAILURE-NOTE

Package

polymorphic-functions.

Source

types.lisp.

Direct superclasses

structure-object.

Direct methods

print-object.

Direct slots
Slot: documentation
Package

common-lisp.

Type

(or null string)

Readers

polymorph-documentation.

Writers

(setf polymorph-documentation).

Slot: name
Initform

(error "name must be supplied!")

Readers

polymorph-name.

Writers

(setf polymorph-name).

Slot: source
Readers

polymorph-source.

Writers

(setf polymorph-source).

Slot: return-type
Readers

polymorph-return-type.

Writers

(setf polymorph-return-type).

Slot: type-list
Readers

polymorph-type-list.

Writers

(setf polymorph-type-list).

Slot: lambda-list-type
Readers

polymorph-lambda-list-type.

Writers

(setf polymorph-lambda-list-type).

Slot: effective-type-list
Readers

polymorph-effective-type-list.

Writers

(setf polymorph-effective-type-list).

Slot: more-optimal-type-list
Readers

polymorph-more-optimal-type-list.

Writers

(setf polymorph-more-optimal-type-list).

Slot: suboptimal-note
Readers

polymorph-suboptimal-note.

Writers

(setf polymorph-suboptimal-note).

Slot: compiler-applicable-p-lambda
Readers

polymorph-compiler-applicable-p-lambda.

Writers

(setf polymorph-compiler-applicable-p-lambda).

Slot: runtime-applicable-p-form
Readers

polymorph-runtime-applicable-p-form.

Writers

(setf polymorph-runtime-applicable-p-form).

Slot: inline-p
Readers

polymorph-inline-p.

Writers

(setf polymorph-inline-p).

Slot: inline-lambda-body
Readers

polymorph-inline-lambda-body.

Writers

(setf polymorph-inline-lambda-body).

Slot: static-dispatch-name
Readers

polymorph-static-dispatch-name.

Writers

(setf polymorph-static-dispatch-name).

Slot: compiler-macro-lambda
Readers

polymorph-compiler-macro-lambda.

Writers

(setf polymorph-compiler-macro-lambda).

Slot: compiler-macro-source
Readers

polymorph-compiler-macro-source.

Writers

(setf polymorph-compiler-macro-source).

Slot: parameters
Type

polymorphic-functions::polymorph-parameters

Initform

(error "polymorph-parameters must be supplied")

Readers

polymorph-parameters.

Writers

(setf polymorph-parameters).


Previous: , Up: Public Interface   [Contents][Index]

6.1.9 Classes

Class: polymorphic-function
Package

polymorphic-functions.

Source

types.lisp.

Direct superclasses

funcallable-standard-object.

Direct methods
Direct slots
Slot: name
Initform

(error "name must be supplied.")

Initargs

:name

Readers

polymorphic-function-name.

Writers

This slot is read-only.

Slot: source
Initargs

:source

Readers

polymorphic-function-source.

Writers

This slot is read-only.

Slot: lambda-list
Type

list

Initform

(error "lambda-list must be supplied.")

Initargs

:lambda-list

Readers

polymorphic-function-lambda-list.

Writers

This slot is read-only.

Slot: effective-lambda-list
Type

list

Initform

(error "effective-lambda-list must be supplied.")

Initargs

:effective-lambda-list

Readers

polymorphic-function-effective-lambda-list.

Writers

This slot is read-only.

Slot: lambda-list-type
Type

polymorphic-functions::lambda-list-type

Initform

(error "lambda-list-type must be supplied.")

Initargs

:lambda-list-type

Readers

polymorphic-function-lambda-list-type.

Writers

This slot is read-only.

Slot: default
Type

function

Initform

(error ":default must be supplied")

Initargs

:default

Readers

polymorphic-function-default.

Writers

This slot is read-only.

Slot: polymorphs
Readers

polymorphic-function-polymorphs.

Writers

(setf polymorphic-function-polymorphs).

Slot: documentation
Package

common-lisp.

Type

(or string null)

Initargs

:documentation

Slot: invalidated-p
Readers

polymorphic-function-invalidated-p.

Writers

(setf polymorphic-function-invalidated-p).

Slot: %lock
Initform

(sb-thread:make-mutex :name "gf lock")

Readers

gf-lock.

Writers

This slot is read-only.


6.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.1 Constants

Constant: +compute-effective-lambda-list-doc+
Package

polymorphic-functions.

Source

doc.lisp.

Constant: +compute-polymorphic-function-lambda-body-doc+
Package

polymorphic-functions.

Source

doc.lisp.

Constant: +effective-lambda-list-doc-helper+
Package

polymorphic-functions.

Source

doc.lisp.

Constant: +lambda-declarations-doc+
Package

polymorphic-functions.

Source

doc.lisp.

Constant: +lambda-list-type-doc+
Package

polymorphic-functions.

Source

doc.lisp.

Constant: +lambda-list-types+
Package

polymorphic-functions.

Source

base.lisp.

Constant: +sbcl-transform-arg-lvars-from-lambda-list-form+
Package

polymorphic-functions.

Source

doc.lisp.

Constant: +type-list-intersection-null-p+
Package

polymorphic-functions.

Source

doc.lisp.

Constant: +type-list-more-specific-p+
Package

polymorphic-functions.

Source

doc.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.2 Special variables

Special Variable: *environment*

Bound inside the DEFINE-COMPILER-MACRO defined in DEFINE-POLYMORPH for use by functions like TYPE-LIST-APPLICABLE-P

Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Special Variable: *extended-type-specifiers*
Package

polymorphic-functions.extended-types.

Source

core.lisp.

Special Variable: *lambda-list*

LAMBDA-LIST of the typed function being compiled. Bound inside the functions defined by POLYMORPHS::DEFINE-LAMBDA-LIST-HELPER

Package

polymorphic-functions.

Source

base.lisp.

Special Variable: *lambda-list-typed-p*

Is T if the *LAMBDA-LIST* being processed is to be treated as if it had type specifiers. Bound inside the functions defined by POLYMORPHS::DEFINE-LAMBDA-LIST-HELPER

Package

polymorphic-functions.

Source

base.lisp.

Special Variable: *name*

NAME of the typed function being compiled. Bound inside DEFINE-POLYMORPH

Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Special Variable: *potential-type*

POTENTIAL-TYPE of the LAMBDA-LIST of the typed function being compiled. Bound inside the functions defined by POLYMORPHS::DEFINE-LAMBDA-LIST-HELPER

Package

polymorphic-functions.

Source

base.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.3 Symbol macros

Symbol Macro: optim-debug
Package

polymorphic-functions.

Source

package.lisp.

Symbol Macro: optim-safety
Package

polymorphic-functions.

Source

package.lisp.

Symbol Macro: optim-slight-speed
Package

polymorphic-functions.

Source

package.lisp.

Symbol Macro: optim-speed
Package

polymorphic-functions.

Source

package.lisp.


6.2.4 Macros

Macro: catch-condition (form)
Package

polymorphic-functions.

Source

package.lisp.

Macro: define-compiled-function (name lambda-list &body body)
Package

polymorphic-functions.

Source

misc-tests.lisp.

Macro: define-lambda-list-helper ((outer-name outer-documentation) (inner-name inner-documentation) &body action-form)

ACTION-FORM should be defined in terms of *POTENTIAL-TYPE* and *LAMBDA-LIST* variables.

Package

polymorphic-functions.

Source

base.lisp.

Macro: ignoring-error-output (&body body)
Package

polymorphic-functions.

Source

misc-tests.lisp.

Macro: is-error (form)
Package

polymorphic-functions.

Source

package.lisp.

Macro: list-named-lambda (name package lambda-list &body body)
Package

polymorphic-functions.

Source

package.lisp.

Macro: time-it (&body body)
Package

polymorphic-functions.

Source

benchmark.lisp.

Macro: time-it/normalize (&body body)
Package

polymorphic-functions.

Source

benchmark.lisp.

Macro: with-muffled-compilation-warnings (&body body)
Package

polymorphic-functions.

Source

dispatch.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.5 Ordinary functions

Function: accepts-argument-of-type-p (polymorph-parameters type)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: add-or-update-polymorph (polymorphic-function polymorph)

Returns T if the POLYMOMRPH with identical effective-type-list existed, otherwise returns NIL.

Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: blockify-name (name)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: compiler-applicable-p-lambda-body (polymorph-parameters)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: compiler-retrieve-polymorph (name &rest arg-types-alist)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: copy-polymorph (instance)
Package

polymorphic-functions.

Source

types.lisp.

Function: copy-polymorph-parameter (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: copy-polymorph-parameters (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: copy-type-parameter (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: csubtypep (type)
Package

polymorphic-functions.extended-types.

Source

subtypep.lisp.

Function: csupertypep (type)
Package

polymorphic-functions.extended-types.

Source

supertypep.lisp.

Function: ctype= (type)
Package

polymorphic-functions.extended-types.

Source

type=.lisp.

Function: deparameterize-type (type-specifier)
Package

polymorphic-functions.

Source

deparameterize-type.lisp.

Function: enhanced-lambda-declarations (polymorph-parameters arg-types &optional return-type)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: ensure-type-form (type form &optional env)

Returns two values: a form that has ASSERTs with SIMPLE-TYPE-ERROR to check the type as well as the type enhanced using TYPE.

Package

polymorphic-functions.

Source

ensure-type-form.lisp.

Function: ensure-unambiguous-call (name type-list effective-type-list)
Package

polymorphic-functions.

Source

dispatch.lisp.

Function: extended-subtypep (type1 type2 &optional environment)
Package

polymorphic-functions.

Source

core.lisp.

Function: extended-type-list-p (list)
Package

polymorphic-functions.

Source

types.lisp.

Function: extract-declarations (body)

Returns two values: DECLARATIONS and remaining BODY

Package

polymorphic-functions.

Source

dispatch.lisp.

Function: ftype-for-static-dispatch (static-dispatch-name effective-type-list return-type env)
Package

polymorphic-functions.

Source

base.lisp.

Function: invalidate-polymorphic-function-lambda (polymorphic-function)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: lambda-declarations (polymorph-parameters)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: lambda-list-type (lambda-list &key typed)

Returns the type of LAMBDA-LIST from amongst +LAMBDA-LIST-TYPES+. Raises an ERROR otherwise.

Package

polymorphic-functions.

Source

base.lisp.

Function: lambda-list-type-p (object)

Checks whhether the OBJECT is in +LAMBDA-LIST-TYPES+

Package

polymorphic-functions.

Source

base.lisp.

Function: macroexpand-all (form &optional env)
Package

polymorphic-functions.

Source

package.lisp.

Function: make-polymorph (&key documentation name source return-type type-list lambda-list-type effective-type-list more-optimal-type-list suboptimal-note compiler-applicable-p-lambda runtime-applicable-p-form inline-p inline-lambda-body static-dispatch-name compiler-macro-lambda compiler-macro-source parameters)
Package

polymorphic-functions.

Source

types.lisp.

Function: make-polymorph-parameter (&key local-name form-in-pf value-type default-value-form supplied-p-name type-parameters value-effective-type)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: make-polymorph-parameters (&key required optional rest keyword min-args max-args validator-form)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: make-polymorph-parameters-from-lambda-lists (polymorphic-function-lambda-list polymorph-lambda-list)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: make-sbcl-transform-body (name typed-lambda-list inline-lambda-body polymorph-parameters)
Package

polymorphic-functions.

Source

sbcl-transform.lisp.

Function: make-type-parameter (&key name run-time-deparameterizer-lambda-body compile-time-deparameterizer-lambda compile-time-deparameterizer-lambda-body)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: map-polymorph-parameters (polymorph-parameters &key required optional keyword rest)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: most-specialized-applicable-transform-p (name arg-types-alist type-list)
Package

polymorphic-functions.

Source

sbcl-transform.lisp.

Function: normalize-typed-lambda-list (typed-lambda-list)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: note-no-inline (form datum &rest arguments)
Package

polymorphic-functions.

Source

conditions.lisp.

Function: note-null-env (form datum &rest arguments)
Package

polymorphic-functions.

Source

conditions.lisp.

Function: null-env-compilation-warnings (lambda-form)
Package

polymorphic-functions.

Source

dispatch.lisp.

Function: parametric-type-parameters (parametric-type-spec)
Package

polymorphic-functions.

Source

parametric-types.lisp.

Function: parametric-type-specifier-p (type-specifier)
Package

polymorphic-functions.

Source

parametric-types.lisp.

Function: parametric-type-symbol-p (atom)
Package

polymorphic-functions.

Source

parametric-types.lisp.

Function: pf-compiler-macro (form &optional env)
Package

polymorphic-functions.

Source

compiler-macro.lisp.

Function: policy-quality (quality &optional env)
Package

polymorphic-functions.

Source

package.lisp.

Reader: polymorph-compiler-applicable-p-lambda (instance)
Writer: (setf polymorph-compiler-applicable-p-lambda) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

compiler-applicable-p-lambda.

Reader: polymorph-compiler-macro-lambda (instance)
Writer: (setf polymorph-compiler-macro-lambda) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

compiler-macro-lambda.

Reader: polymorph-compiler-macro-source (instance)
Writer: (setf polymorph-compiler-macro-source) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

compiler-macro-source.

Reader: polymorph-documentation (instance)
Writer: (setf polymorph-documentation) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

documentation.

Function: polymorph-effective-lambda-list (polymorph-parameters)

Returns 3 values:
- The first value is the LAMBDA-LIST suitable for constructing polymorph’s lambda - The second value is the TYPE-LIST corresponding to the polymorph
- The third value is the EFFECTIVE-TYPE-LIST corresponding to the polymorph

Package

polymorphic-functions.

Source

parameters.lisp.

Reader: polymorph-effective-type-list (instance)
Writer: (setf polymorph-effective-type-list) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

effective-type-list.

Reader: polymorph-inline-lambda-body (instance)
Writer: (setf polymorph-inline-lambda-body) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

inline-lambda-body.

Reader: polymorph-inline-p (instance)
Writer: (setf polymorph-inline-p) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

inline-p.

Reader: polymorph-lambda-list-type (instance)
Writer: (setf polymorph-lambda-list-type) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

lambda-list-type.

Reader: polymorph-more-optimal-type-list (instance)
Writer: (setf polymorph-more-optimal-type-list) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

more-optimal-type-list.

Reader: polymorph-name (instance)
Writer: (setf polymorph-name) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

name.

Function: polymorph-p (object)
Package

polymorphic-functions.

Source

types.lisp.

Function: polymorph-parameter-p (object)
Package

polymorphic-functions.

Source

parameters.lisp.

Reader: polymorph-parameters (instance)
Writer: (setf polymorph-parameters) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

parameters.

Reader: polymorph-parameters-keyword (instance)
Writer: (setf polymorph-parameters-keyword) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

keyword.

Reader: polymorph-parameters-max-args (instance)
Writer: (setf polymorph-parameters-max-args) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

max-args.

Reader: polymorph-parameters-min-args (instance)
Writer: (setf polymorph-parameters-min-args) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

min-args.

Reader: polymorph-parameters-optional (instance)
Writer: (setf polymorph-parameters-optional) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

optional.

Function: polymorph-parameters-p (object)
Package

polymorphic-functions.

Source

parameters.lisp.

Reader: polymorph-parameters-required (instance)
Writer: (setf polymorph-parameters-required) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

required.

Reader: polymorph-parameters-rest (instance)
Writer: (setf polymorph-parameters-rest) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

rest.

Reader: polymorph-parameters-validator-form (instance)
Writer: (setf polymorph-parameters-validator-form) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

validator-form.

Reader: polymorph-return-type (instance)
Writer: (setf polymorph-return-type) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

return-type.

Reader: polymorph-runtime-applicable-p-form (instance)
Writer: (setf polymorph-runtime-applicable-p-form) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

runtime-applicable-p-form.

Reader: polymorph-source (instance)
Writer: (setf polymorph-source) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

source.

Reader: polymorph-static-dispatch-name (instance)
Writer: (setf polymorph-static-dispatch-name) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

static-dispatch-name.

Reader: polymorph-suboptimal-note (instance)
Writer: (setf polymorph-suboptimal-note) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

suboptimal-note.

Reader: polymorph-type-list (instance)
Writer: (setf polymorph-type-list) (instance)
Package

polymorphic-functions.

Source

types.lisp.

Target Slot

type-list.

Function: polymorphic-function-effective-type-lists (polymorphic-function)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: polymorphic-function-make-effective-lambda-list (untyped-lambda-list)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: potential-type-of-lambda-list (lambda-list)
Package

polymorphic-functions.

Source

base.lisp.

Reader: pp-default-value-form (instance)
Writer: (setf pp-default-value-form) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

default-value-form.

Reader: pp-form-in-pf (instance)
Writer: (setf pp-form-in-pf) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

form-in-pf.

Reader: pp-local-name (instance)
Writer: (setf pp-local-name) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

local-name.

Reader: pp-supplied-p-name (instance)
Writer: (setf pp-supplied-p-name) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

supplied-p-name.

Reader: pp-type-parameters (instance)
Writer: (setf pp-type-parameters) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

type-parameters.

Reader: pp-value-effective-type (instance)
Writer: (setf pp-value-effective-type) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

value-effective-type.

Reader: pp-value-type (instance)
Writer: (setf pp-value-type) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

value-type.

Function: recursive-function-p (name body)
Package

polymorphic-functions.

Source

dispatch.lisp.

Function: register-polymorph (name inline-p typed-lambda-list type-list effective-type-list more-optimal-type-list suboptimal-note return-type inline-lambda-body static-dispatch-name lambda-list-type runtime-applicable-p-form compiler-applicable-p-lambda &optional source-location)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: register-polymorph-compiler-macro (name type-list lambda &optional source)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: register-polymorphic-function (name untyped-lambda-list documentation default &key overwrite source)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: remove-polymorph (name type-list)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: retrieve-polymorph-compiler-macro (name &rest arg-list)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: run-time-applicable-p-form (polymorph-parameters)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: sbcl-transform-arg-lvars-from-lambda-list-form (lambda-list &key typed)

Returns a FORM that can process the parameters of SB-C:DEFTRANSFORM to form an argument lvar alist list suitable for further processing.

Package

polymorphic-functions.

Source

base.lisp.

Function: setf-function-name-p (object)
Package

polymorphic-functions.

Source

package.lisp.

Function: simple-deparameterize-type (type-specifier &optional env)
Package

polymorphic-functions.

Source

deparameterize-type.lisp.

Function: subtypep-using-subtypep-alist (type1 type2 &optional environment)
Package

polymorphic-functions.

Source

core.lisp.

Function: translate-body (body translation-alist)
Package

polymorphic-functions.

Source

core.lisp.

Function: traverse-tree (tree &optional function)

Traverses TREE and calls function on each subtree and node of TREE. If FUNCTION returns a list, then traversing the list can be avoided if the second return value is non-NIL. If FUNCTION returns a list, traverses the list only if the second return value is NIL.

Package

polymorphic-functions.

Source

core.lisp.

Function: type-list-compatible-p (lambda-list-type type-list effective-untyped-lambda-list)

Returns T if the given TYPE-LIST is compatible with the given UNTYPED-LAMBDA-LIST.

Package

polymorphic-functions.

Source

base.lisp.

Function: type-list-intersection-null-p (type-list-1 type-list-2)

Returns T if there exist argument lists that are compatible with both TYPE-LIST-1 and TYPE-LIST-2

Package

polymorphic-functions.

Source

base.lisp.

Function: type-list-more-specific-p (type-list-1 type-list-2)

Returns T if TYPE-LIST-1 is more specialized than TYPE-LIST-2

Package

polymorphic-functions.

Source

base.lisp.

Function: type-list-order-keywords (type-list)
Package

polymorphic-functions.

Source

types.lisp.

Function: type-list-p (list)
Package

polymorphic-functions.

Source

types.lisp.

Reader: type-parameter-compile-time-deparameterizer-lambda (instance)
Writer: (setf type-parameter-compile-time-deparameterizer-lambda) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

compile-time-deparameterizer-lambda.

Reader: type-parameter-compile-time-deparameterizer-lambda-body (instance)
Writer: (setf type-parameter-compile-time-deparameterizer-lambda-body) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

compile-time-deparameterizer-lambda-body.

Reader: type-parameter-name (instance)
Writer: (setf type-parameter-name) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

name.

Function: type-parameter-p (object)
Package

polymorphic-functions.

Source

parameters.lisp.

Reader: type-parameter-run-time-deparameterizer-lambda-body (instance)
Writer: (setf type-parameter-run-time-deparameterizer-lambda-body) (instance)
Package

polymorphic-functions.

Source

parameters.lisp.

Target Slot

run-time-deparameterizer-lambda-body.

Function: type-parameters-from-parametric-type (parametric-type-spec)

Returns a list oF TYPE-PARAMETERS

Package

polymorphic-functions.

Source

parametric-types.lisp.

Function: typed-lambda-list-p (lambda-list)
Package

polymorphic-functions.

Source

base.lisp.

Function: typexpand (type-specifier &optional env)
Package

polymorphic-functions.

Source

package.lisp.

Function: untyped-lambda-list (normalized-typed-lambda-list)
Package

polymorphic-functions.

Source

parameters.lisp.

Function: untyped-lambda-list-p (lambda-list)
Package

polymorphic-functions.

Source

base.lisp.

Function: update-polymorphic-function-lambda (polymorphic-function &optional invalidate)
Package

polymorphic-functions.

Source

polymorphic-function.lisp.

Function: valid-parameter-name-p (name)
Package

polymorphic-functions.

Source

base.lisp.


6.2.6 Generic functions

Generic Function: %lambda-list-type (potential-lambda-list-type lambda-list)

Checks whether LAMBDA-LIST is of type POTENTIAL-LAMBDA-LIST-TYPE

Package

polymorphic-functions.

Source

base.lisp.

Methods
Method: %lambda-list-type ((type (eql rest)) (lambda-list list))
Source

rest.lisp.

Method: %lambda-list-type ((type (eql polymorphic-functions::required-key)) (lambda-list list))
Source

required-key.lisp.

Method: %lambda-list-type ((type (eql polymorphic-functions::required-optional)) (lambda-list list))
Source

required-optional.lisp.

Method: %lambda-list-type ((type (eql polymorphic-functions::required)) (lambda-list list))
Source

required.lisp.

Method: %lambda-list-type (type lambda-list)
Generic Function: %sbcl-transform-arg-lvars-from-lambda-list-form (potential-lambda-list-type lambda-list)

Returns a FORM that can process the parameters of SB-C:DEFTRANSFORM to form an argument lvar alist list suitable for further processing.

Package

polymorphic-functions.

Source

base.lisp.

Methods
Method: %sbcl-transform-arg-lvars-from-lambda-list-form ((type (eql rest)) (untyped-lambda-list list))
Source

rest.lisp.

Method: %sbcl-transform-arg-lvars-from-lambda-list-form ((type (eql polymorphic-functions::required-key)) (untyped-lambda-list list))
Source

required-key.lisp.

Method: %sbcl-transform-arg-lvars-from-lambda-list-form ((type (eql polymorphic-functions::required-optional)) (untyped-lambda-list list))
Source

required-optional.lisp.

Method: %sbcl-transform-arg-lvars-from-lambda-list-form ((type (eql polymorphic-functions::required)) (untyped-lambda-list list))
Source

required.lisp.

Method: %sbcl-transform-arg-lvars-from-lambda-list-form (type lambda-list)
Generic Function: %type-list-compatible-p (potential-lambda-list-type type-list untyped-lambda-list)
Package

polymorphic-functions.

Source

base.lisp.

Methods
Method: %type-list-compatible-p ((type (eql rest)) (type-list list) (untyped-lambda-list list))
Source

rest.lisp.

Method: %type-list-compatible-p ((type (eql polymorphic-functions::required-key)) (type-list list) (untyped-lambda-list list))
Source

required-key.lisp.

Method: %type-list-compatible-p ((type (eql polymorphic-functions::required-optional)) (type-list list) (untyped-lambda-list list))
Source

required-optional.lisp.

Method: %type-list-compatible-p ((type (eql polymorphic-functions::required)) (type-list list) (untyped-lambda-list list))
Source

required.lisp.

Method: %type-list-compatible-p (type type-list untyped-lambda-list)
Generic Function: %type-list-intersection-null-p (type-1 type-2 type-list-1 type-list-2)

Returns T if there exist argument lists that are compatible with both TYPE-LIST-1 and TYPE-LIST-2

Package

polymorphic-functions.

Source

base.lisp.

Methods
Method: %type-list-intersection-null-p ((type-1 (eql polymorphic-functions::required-key)) (type-2 (eql polymorphic-functions::required)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-intersection-null-p ((type-1 (eql polymorphic-functions::required-key)) (type-2 (eql rest)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-intersection-null-p ((type-1 (eql polymorphic-functions::required)) (type-2 (eql rest)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-intersection-null-p ((type-1 (eql polymorphic-functions::required)) (type-2 (eql polymorphic-functions::required-key)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-intersection-null-p ((type-1 (eql rest)) (type-2 (eql polymorphic-functions::required-key)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-intersection-null-p ((type-1 (eql rest)) (type-2 (eql polymorphic-functions::required)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-intersection-null-p ((type-1 (eql rest)) (type-2 (eql rest)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-intersection-null-p ((type-1 (eql polymorphic-functions::required-key)) (type-2 (eql polymorphic-functions::required-key)) list-1 list-2)
Source

required-key.lisp.

Method: %type-list-intersection-null-p ((type-1 (eql polymorphic-functions::required-optional)) (type-2 (eql polymorphic-functions::required-optional)) list-1 list-2)
Source

required-optional.lisp.

Method: %type-list-intersection-null-p ((type-1 (eql polymorphic-functions::required)) (type-2 (eql polymorphic-functions::required)) list-1 list-2)
Source

required.lisp.

Generic Function: %type-list-more-specific-p (type-1 type-2 type-list-1 type-list-2)

Returns T if TYPE-LIST-1 is more specialized than TYPE-LIST-2

Package

polymorphic-functions.

Source

base.lisp.

Methods
Method: %type-list-more-specific-p ((type-1 (eql polymorphic-functions::required)) (type-2 (eql polymorphic-functions::required-key)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-more-specific-p ((type-1 (eql polymorphic-functions::required-key)) (type-2 (eql polymorphic-functions::required)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-more-specific-p ((type-1 (eql polymorphic-functions::required-key)) (type-2 (eql rest)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-more-specific-p ((type-1 (eql rest)) (type-2 (eql polymorphic-functions::required-key)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-more-specific-p ((type-1 (eql polymorphic-functions::required)) (type-2 (eql rest)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-more-specific-p ((type-1 (eql rest)) (type-2 (eql polymorphic-functions::required)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-more-specific-p ((type-1 (eql rest)) (type-2 (eql rest)) list-1 list-2)
Source

rest.lisp.

Method: %type-list-more-specific-p ((type-1 (eql polymorphic-functions::required-key)) (type-2 (eql polymorphic-functions::required-key)) list-1 list-2)
Source

required-key.lisp.

Method: %type-list-more-specific-p ((type-1 (eql polymorphic-functions::required-optional)) (type-2 (eql polymorphic-functions::required-optional)) list-1 list-2)
Source

required-optional.lisp.

Method: %type-list-more-specific-p ((type-1 (eql polymorphic-functions::required)) (type-2 (eql polymorphic-functions::required)) list-1 list-2)
Source

required.lisp.

Generic Reader: arg-types (condition)
Package

polymorphic-functions.

Methods
Reader Method: arg-types ((condition no-applicable-polymorph))
Source

conditions.lisp.

Target Slot

arg-types.

Generic Reader: args (condition)
Package

polymorphic-functions.

Methods
Reader Method: args ((condition no-applicable-polymorph))
Source

conditions.lisp.

Target Slot

args.

Generic Function: compute-polymorphic-function-lambda-body (lambda-list-type effective-untyped-lambda-list &optional invalidated-p)

Processes LAMBDA-LIST to return the body for the lambda constructed in UPDATE-POLYMORPHIC-FUNCTION-LAMBDA.
Raises an error if %LAMBDA-LIST-TYPE fails on *POTENTIAL-TYPE*.
If INVALIDATED-P is non-NIL, then emits a dummy body that will first call UPDATE-POLYMORPHIC-FUNCTION-LAMBDA with INVALIDATE as NIL, and then recall the function. Can contain CTYPE::CTYPE objects that are not expected dumped.

Package

polymorphic-functions.

Source

base.lisp.

Methods
Method: compute-polymorphic-function-lambda-body ((type (eql rest)) (untyped-lambda-list list) &optional invalidated-p)
Source

rest.lisp.

Method: compute-polymorphic-function-lambda-body ((type (eql polymorphic-functions::required-key)) (untyped-lambda-list list) &optional invalidated-p)
Source

required-key.lisp.

Method: compute-polymorphic-function-lambda-body ((type (eql polymorphic-functions::required-optional)) (effective-lambda-list list) &optional invalidated-p)
Source

required-optional.lisp.

Method: compute-polymorphic-function-lambda-body ((type (eql polymorphic-functions::required)) (untyped-lambda-list list) &optional invalidated-p)
Source

required.lisp.

Generic Reader: condition-datum (condition)
Package

polymorphic-functions.

Methods
Reader Method: condition-datum ((condition defpolymorph-note))
Source

conditions.lisp.

Target Slot

datum.

Generic Reader: csubtypep-type (object)
Package

polymorphic-functions.extended-types.

Methods
Reader Method: csubtypep-type ((csubtypep csubtypep))

automatically generated reader method

Source

subtypep.lisp.

Target Slot

%type.

Generic Reader: csupertypep-type (object)
Package

polymorphic-functions.extended-types.

Methods
Reader Method: csupertypep-type ((csupertypep csupertypep))

automatically generated reader method

Source

supertypep.lisp.

Target Slot

%type.

Generic Reader: ctype=-type (object)
Package

polymorphic-functions.extended-types.

Methods
Reader Method: ctype=-type ((ctype= ctype=))

automatically generated reader method

Source

type=.lisp.

Target Slot

%type.

Generic Reader: effective-type-lists (condition)
Package

polymorphic-functions.

Methods
Reader Method: effective-type-lists ((condition no-applicable-polymorph))
Source

conditions.lisp.

Target Slot

effective-type-lists.

Generic Reader: form (condition)
Package

polymorphic-functions.

Methods
Reader Method: form ((condition form-type-failure))
Source

conditions.lisp.

Target Slot

form.

Generic Reader: more-optimal-type-list (condition)
Package

polymorphic-functions.

Methods
Reader Method: more-optimal-type-list ((condition more-optimal-polymorph-inapplicable))
Source

conditions.lisp.

Target Slot

more-optimal-type-list.

Generic Reader: name (condition)
Package

polymorphic-functions.

Methods
Reader Method: name ((condition polymorph-has-no-inline-lambda-body))
Source

conditions.lisp.

Target Slot

name.

Reader Method: name ((condition no-applicable-polymorph))
Source

conditions.lisp.

Target Slot

name.

Reader Method: name ((condition not-a-ahp))
Source

conditions.lisp.

Target Slot

name.

Reader Method: name ((condition lambda-list-has-changed))
Source

conditions.lisp.

Target Slot

name.

Generic Reader: new-lambda-list (condition)
Package

polymorphic-functions.

Methods
Reader Method: new-lambda-list ((condition lambda-list-has-changed))
Source

conditions.lisp.

Target Slot

new-lambda-list.

Generic Function: parametric-type-compile-time-lambda (type-car type-cdr type-parameter)

Users are expected to specialize on the TYPE-CAR using an (EQL symbol) specializer. TYPE-CAR and TYPE-CDR together make up the parametric-type, while TYPE-PARAMETER
is one of the type parameter in the parametric-type.

The methods implemented should return a one-argument lambda-*expression* (not function). The expression will be compiled to a function and called with the appropriate *form-type* at run-time. The function should return the value of the TYPE-PARAMETER corresponding to the *form-type* and the parametric type.

Package

polymorphic-functions.

Source

parametric-types.lisp.

Generic Reader: polymorphic-function-default (object)
Package

polymorphic-functions.

Methods
Reader Method: polymorphic-function-default ((polymorphic-function polymorphic-function))

automatically generated reader method

Source

types.lisp.

Target Slot

default.

Generic Reader: polymorphic-function-effective-lambda-list (object)
Package

polymorphic-functions.

Methods
Reader Method: polymorphic-function-effective-lambda-list ((polymorphic-function polymorphic-function))

automatically generated reader method

Source

types.lisp.

Target Slot

effective-lambda-list.

Generic Reader: polymorphic-function-invalidated-p (object)
Package

polymorphic-functions.

Methods
Reader Method: polymorphic-function-invalidated-p ((polymorphic-function polymorphic-function))

automatically generated reader method

Source

types.lisp.

Target Slot

invalidated-p.

Generic Writer: (setf polymorphic-function-invalidated-p) (object)
Package

polymorphic-functions.

Methods
Writer Method: (setf polymorphic-function-invalidated-p) ((polymorphic-function polymorphic-function))

automatically generated writer method

Source

types.lisp.

Target Slot

invalidated-p.

Generic Reader: polymorphic-function-lambda-list (object)
Package

polymorphic-functions.

Methods
Reader Method: polymorphic-function-lambda-list ((polymorphic-function polymorphic-function))

automatically generated reader method

Source

types.lisp.

Target Slot

lambda-list.

Generic Reader: polymorphic-function-lambda-list-type (object)
Package

polymorphic-functions.

Methods
Reader Method: polymorphic-function-lambda-list-type ((polymorphic-function polymorphic-function))

automatically generated reader method

Source

types.lisp.

Target Slot

lambda-list-type.

Generic Reader: polymorphic-function-name (object)
Package

polymorphic-functions.

Methods
Reader Method: polymorphic-function-name ((polymorphic-function polymorphic-function))

automatically generated reader method

Source

types.lisp.

Target Slot

name.

Generic Reader: polymorphic-function-polymorphs (object)
Package

polymorphic-functions.

Methods
Reader Method: polymorphic-function-polymorphs ((polymorphic-function polymorphic-function))

automatically generated reader method

Source

types.lisp.

Target Slot

polymorphs.

Generic Writer: (setf polymorphic-function-polymorphs) (object)
Package

polymorphic-functions.

Methods
Writer Method: (setf polymorphic-function-polymorphs) ((polymorphic-function polymorphic-function))

automatically generated writer method

Source

types.lisp.

Target Slot

polymorphs.

Generic Reader: polymorphic-function-source (object)
Package

polymorphic-functions.

Methods
Reader Method: polymorphic-function-source ((polymorphic-function polymorphic-function))

automatically generated reader method

Source

types.lisp.

Target Slot

source.

Generic Reader: type-list (condition)
Package

polymorphic-functions.

Methods
Reader Method: type-list ((condition suboptimal-polymorph-note))
Source

conditions.lisp.

Target Slot

type-list.

Reader Method: type-list ((condition polymorph-has-no-inline-lambda-body))
Source

conditions.lisp.

Target Slot

type-list.

Generic Function: upgraded-extended-type (type-car)

Used within POLYMORPHIC-FUNCTIONS to prepare a (CL:DECLARE (CL:TYPE ...)) statement for further type-based optimization by the compiler. This is similar to CL:UPGRADED-ARRAY-ELEMENT-TYPE.

Package

polymorphic-functions.extended-types.

Source

core.lisp.

Methods
Method: upgraded-extended-type ((type-car (eql polymorphic-functions.extended-types:subtypep)))
Source

subtypep.lisp.

Method: upgraded-extended-type ((type-car (eql polymorphic-functions.extended-types:type=)))
Source

type=.lisp.

Method: upgraded-extended-type ((type-car (eql polymorphic-functions.extended-types:supertypep)))
Source

supertypep.lisp.

Method: upgraded-extended-type ((type-car (eql polymorphic-functions::type-like)))

Next: , Previous: , Up: Internals   [Contents][Index]

6.2.7 Standalone methods

Reader Method: gf-lock ((polymorphic-function polymorphic-function))

automatically generated reader method

Package

sb-pcl.

Source

types.lisp.

Target Slot

%lock.


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.8 Conditions

Condition: defpolymorph-note
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses

note.

Direct methods

condition-datum.

Direct slots
Slot: datum
Initargs

:datum

Readers

condition-datum.

Writers

This slot is read-only.

Condition: form-type-failure
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses

optimization-failure-note.

Direct methods

form.

Direct slots
Slot: form
Initform

(quote (error "form not specified"))

Initargs

:form

Readers

form.

Writers

This slot is read-only.

Condition: lambda-list-has-changed
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: name
Initform

(quote (error "name must be supplied!"))

Initargs

:name

Readers

name.

Writers

This slot is read-only.

Slot: new-lambda-list
Initform

(quote (error "new lambda list must be supplied!"))

Initargs

:new-lambda-list

Readers

new-lambda-list.

Writers

This slot is read-only.

Condition: no-applicable-polymorph/compiler-note
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses
Condition: no-applicable-polymorph/error
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses
Condition: not-a-ahp
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses

error.

Direct methods

name.

Direct slots
Slot: name
Initform

(quote (error "name must be supplied!"))

Initargs

:name

Readers

name.

Writers

This slot is read-only.

Condition: polymorph-has-no-inline-lambda-body
Package

polymorphic-functions.

Source

conditions.lisp.

Direct superclasses

optimization-failure-note.

Direct methods
Direct slots
Slot: name
Initform

(quote (error "name not specified"))

Initargs

:name

Readers

name.

Writers

This slot is read-only.

Slot: type-list
Initform

(quote (error "type-list not specified"))

Initargs

:type-list

Readers

type-list.

Writers

This slot is read-only.

Condition: return-type-count-mismatch
Package

polymorphic-functions.

Source

ensure-type-form.lisp.

Direct superclasses

condition.

Direct subclasses

return-type-count-mismatch/warning.

Direct slots
Slot: min
Package

common-lisp.

Initargs

:min

Slot: max
Package

common-lisp.

Initargs

:max

Slot: actual
Initargs

:actual

Condition: return-type-count-mismatch/warning
Package

polymorphic-functions.

Source

ensure-type-form.lisp.

Direct superclasses
Condition: return-type-mismatch
Package

polymorphic-functions.

Source

ensure-type-form.lisp.

Direct superclasses

condition.

Direct subclasses
Direct slots
Slot: actual
Initargs

:actual

Slot: index
Initargs

:index

Condition: return-type-mismatch/error
Package

polymorphic-functions.

Source

ensure-type-form.lisp.

Direct superclasses
Direct slots
Slot: expected
Initargs

:expected

Condition: return-type-mismatch/warning
Package

polymorphic-functions.

Source

ensure-type-form.lisp.

Direct superclasses
Direct slots
Slot: declared
Initargs

:declared

Condition: subtypep-not-known
Package

polymorphic-functions.

Source

core.lisp.

Direct superclasses

condition.

Direct slots
Slot: type1
Initargs

:type1

Slot: type2
Initargs

:type2


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.9 Structures

Structure: polymorph-parameter

LOCAL-NAME : Name inside the body of the polymorph
FORM-IN-PF : The form which yields the parameter’s value inside the lexical environment of the polymorphic-function

Note: Only LOCAL-NAME and FORM-IN-PF are relevant for &REST parameter

Package

polymorphic-functions.

Source

parameters.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: local-name
Readers

pp-local-name.

Writers

(setf pp-local-name).

Slot: form-in-pf
Readers

pp-form-in-pf.

Writers

(setf pp-form-in-pf).

Slot: value-type
Readers

pp-value-type.

Writers

(setf pp-value-type).

Slot: default-value-form
Readers

pp-default-value-form.

Writers

(setf pp-default-value-form).

Slot: supplied-p-name
Readers

pp-supplied-p-name.

Writers

(setf pp-supplied-p-name).

Slot: type-parameters
Readers

pp-type-parameters.

Writers

(setf pp-type-parameters).

Slot: value-effective-type
Readers

pp-value-effective-type.

Writers

(setf pp-value-effective-type).

Structure: polymorph-parameters
Package

polymorphic-functions.

Source

parameters.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: required
Readers

polymorph-parameters-required.

Writers

(setf polymorph-parameters-required).

Slot: optional
Readers

polymorph-parameters-optional.

Writers

(setf polymorph-parameters-optional).

Slot: rest
Package

common-lisp.

Readers

polymorph-parameters-rest.

Writers

(setf polymorph-parameters-rest).

Slot: keyword
Package

common-lisp.

Readers

polymorph-parameters-keyword.

Writers

(setf polymorph-parameters-keyword).

Slot: min-args
Readers

polymorph-parameters-min-args.

Writers

(setf polymorph-parameters-min-args).

Slot: max-args
Readers

polymorph-parameters-max-args.

Writers

(setf polymorph-parameters-max-args).

Slot: validator-form
Readers

polymorph-parameters-validator-form.

Writers

(setf polymorph-parameters-validator-form).

Structure: type-parameter

RUN-TIME-DEPARAMETERIZERS-LAMBDA-BODY :
A lambda *expression*, which when compiled produces a one argument function. The function is called at run-time with the value bound to the parameter (not type-parameter) to obtain the value of the TYPE-PARAMETER. COMPILE-TIME-DEPARAMETERIZER-LAMBDA-BODY :
A lambda *expression*, which when compiled produces a one argument function. The function is called at compile-time with the type of the value bound
to the parameter (not type-parameter) to obtain the value of the TYPE-PARAMETER.

Package

polymorphic-functions.

Source

parameters.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: name
Readers

type-parameter-name.

Writers

(setf type-parameter-name).

Slot: run-time-deparameterizer-lambda-body
Readers

type-parameter-run-time-deparameterizer-lambda-body.

Writers

(setf type-parameter-run-time-deparameterizer-lambda-body).

Slot: compile-time-deparameterizer-lambda
Readers

type-parameter-compile-time-deparameterizer-lambda.

Writers

(setf type-parameter-compile-time-deparameterizer-lambda).

Slot: compile-time-deparameterizer-lambda-body
Readers

type-parameter-compile-time-deparameterizer-lambda-body.

Writers

(setf type-parameter-compile-time-deparameterizer-lambda-body).


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.10 Classes

Class: csubtypep
Package

polymorphic-functions.extended-types.

Source

subtypep.lisp.

Direct superclasses

ctype.

Direct methods
Direct slots
Slot: %type
Type

ctype:ctype

Initargs

:type

Readers

csubtypep-type.

Writers

This slot is read-only.

Class: csupertypep
Package

polymorphic-functions.extended-types.

Source

supertypep.lisp.

Direct superclasses

ctype.

Direct methods
Direct slots
Slot: %type
Type

ctype:ctype

Initargs

:type

Readers

csupertypep-type.

Writers

This slot is read-only.

Class: ctype=
Package

polymorphic-functions.extended-types.

Source

type=.lisp.

Direct superclasses

ctype.

Direct methods
Direct slots
Slot: %type
Type

ctype:ctype

Initargs

:type

Readers

ctype=-type.

Writers

This slot is read-only.


Previous: , Up: Internals   [Contents][Index]

6.2.11 Types

Type: extended-type-specifier ()

These type specifiers are implemented using CTYPE and are a tree containing a list starting with an element in *EXTENDED-TYPE-SPECIFIERS*

Package

polymorphic-functions.

Source

core.lisp.

Type: function-name ()

Ref: http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#function_name

Package

polymorphic-functions.

Source

package.lisp.

Type: lambda-list-type ()
Package

polymorphic-functions.

Source

base.lisp.

Type: parametric-type-specifier ()
Package

polymorphic-functions.

Source

parametric-types.lisp.

Type: type-list ()
Package

polymorphic-functions.

Source

types.lisp.

Type: typed-lambda-list ()

Examples:
((a integer) (b integer))
((a integer) &optional ((b integer) 0 b-supplied-p))

Package

polymorphic-functions.

Source

base.lisp.

Type: untyped-lambda-list ()

Examples:
(a b)
(a b &optional c) Non-examples: ((a string))

Package

polymorphic-functions.

Source

base.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
A   B   C   D   E   F   G   I   L   M   N   P   R   S   T   U   V   W  
Index Entry  Section

%
%deparameterize-type: Public generic functions
%deparameterize-type: Public generic functions
%deparameterize-type: Public generic functions
%deparameterize-type: Public generic functions
%deparameterize-type: Public generic functions
%deparameterize-type: Public generic functions
%deparameterize-type: Public generic functions
%deparameterize-type: Public generic functions
%lambda-list-type: Private generic functions
%lambda-list-type: Private generic functions
%lambda-list-type: Private generic functions
%lambda-list-type: Private generic functions
%lambda-list-type: Private generic functions
%lambda-list-type: Private generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
%type-list-compatible-p: Private generic functions
%type-list-compatible-p: Private generic functions
%type-list-compatible-p: Private generic functions
%type-list-compatible-p: Private generic functions
%type-list-compatible-p: Private generic functions
%type-list-compatible-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-intersection-null-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions
%type-list-more-specific-p: Private generic functions

(
(setf polymorph-compiler-applicable-p-lambda): Private ordinary functions
(setf polymorph-compiler-macro-lambda): Private ordinary functions
(setf polymorph-compiler-macro-source): Private ordinary functions
(setf polymorph-documentation): Private ordinary functions
(setf polymorph-effective-type-list): Private ordinary functions
(setf polymorph-inline-lambda-body): Private ordinary functions
(setf polymorph-inline-p): Private ordinary functions
(setf polymorph-lambda-list-type): Private ordinary functions
(setf polymorph-more-optimal-type-list): Private ordinary functions
(setf polymorph-name): Private ordinary functions
(setf polymorph-parameters): Private ordinary functions
(setf polymorph-parameters-keyword): Private ordinary functions
(setf polymorph-parameters-max-args): Private ordinary functions
(setf polymorph-parameters-min-args): Private ordinary functions
(setf polymorph-parameters-optional): Private ordinary functions
(setf polymorph-parameters-required): Private ordinary functions
(setf polymorph-parameters-rest): Private ordinary functions
(setf polymorph-parameters-validator-form): Private ordinary functions
(setf polymorph-return-type): Private ordinary functions
(setf polymorph-runtime-applicable-p-form): Private ordinary functions
(setf polymorph-source): Private ordinary functions
(setf polymorph-static-dispatch-name): Private ordinary functions
(setf polymorph-suboptimal-note): Private ordinary functions
(setf polymorph-type-list): Private ordinary functions
(setf polymorphic-function-invalidated-p): Private generic functions
(setf polymorphic-function-invalidated-p): Private generic functions
(setf polymorphic-function-polymorphs): Private generic functions
(setf polymorphic-function-polymorphs): Private generic functions
(setf pp-default-value-form): Private ordinary functions
(setf pp-form-in-pf): Private ordinary functions
(setf pp-local-name): Private ordinary functions
(setf pp-supplied-p-name): Private ordinary functions
(setf pp-type-parameters): Private ordinary functions
(setf pp-value-effective-type): Private ordinary functions
(setf pp-value-type): Private ordinary functions
(setf type-parameter-compile-time-deparameterizer-lambda): Private ordinary functions
(setf type-parameter-compile-time-deparameterizer-lambda-body): Private ordinary functions
(setf type-parameter-name): Private ordinary functions
(setf type-parameter-run-time-deparameterizer-lambda-body): Private ordinary functions

A
accepts-argument-of-type-p: Private ordinary functions
add-or-update-polymorph: Private ordinary functions
arg-types: Private generic functions
arg-types: Private generic functions
args: Private generic functions
args: Private generic functions

B
blockify-name: Private ordinary functions

C
catch-condition: Private macros
cl-type-specifier-p: Public ordinary functions
Compiler Macro, subtypep: Public compiler macros
Compiler Macro, supertypep: Public compiler macros
Compiler Macro, typep: Public compiler macros
compiler-applicable-p-lambda-body: Private ordinary functions
compiler-retrieve-polymorph: Private ordinary functions
compute-polymorphic-function-lambda-body: Private generic functions
compute-polymorphic-function-lambda-body: Private generic functions
compute-polymorphic-function-lambda-body: Private generic functions
compute-polymorphic-function-lambda-body: Private generic functions
compute-polymorphic-function-lambda-body: Private generic functions
condition-datum: Private generic functions
condition-datum: Private generic functions
conjoin/2: Public standalone methods
conjoin/2: Public standalone methods
copy-polymorph: Private ordinary functions
copy-polymorph-parameter: Private ordinary functions
copy-polymorph-parameters: Private ordinary functions
copy-type-parameter: Private ordinary functions
csubtypep: Private ordinary functions
csubtypep-type: Private generic functions
csubtypep-type: Private generic functions
csupertypep: Private ordinary functions
csupertypep-type: Private generic functions
csupertypep-type: Private generic functions
ctype=: Public standalone methods
ctype=: Public standalone methods
ctype=: Public standalone methods
ctype=: Private ordinary functions
ctype=-type: Private generic functions
ctype=-type: Private generic functions
ctypep: Public standalone methods
ctypep: Public standalone methods
ctypep: Public standalone methods

D
define-compiled-function: Private macros
define-lambda-list-helper: Private macros
define-polymorphic-function: Public macros
definitive-subtypep: Public ordinary functions
defpackage: Public macros
defpolymorph: Public macros
defpolymorph-compiler-macro: Public macros
deparameterize-type: Private ordinary functions

E
effective-type-lists: Private generic functions
effective-type-lists: Private generic functions
enhanced-lambda-declarations: Private ordinary functions
ensure-type-form: Private ordinary functions
ensure-unambiguous-call: Private ordinary functions
extended-subtypep: Private ordinary functions
extended-type-list-p: Private ordinary functions
extended-type-specifier-p: Public ordinary functions
extract-declarations: Private ordinary functions

F
find-polymorph: Public ordinary functions
form: Private generic functions
form: Private generic functions
ftype-for-static-dispatch: Private ordinary functions
Function, (setf polymorph-compiler-applicable-p-lambda): Private ordinary functions
Function, (setf polymorph-compiler-macro-lambda): Private ordinary functions
Function, (setf polymorph-compiler-macro-source): Private ordinary functions
Function, (setf polymorph-documentation): Private ordinary functions
Function, (setf polymorph-effective-type-list): Private ordinary functions
Function, (setf polymorph-inline-lambda-body): Private ordinary functions
Function, (setf polymorph-inline-p): Private ordinary functions
Function, (setf polymorph-lambda-list-type): Private ordinary functions
Function, (setf polymorph-more-optimal-type-list): Private ordinary functions
Function, (setf polymorph-name): Private ordinary functions
Function, (setf polymorph-parameters): Private ordinary functions
Function, (setf polymorph-parameters-keyword): Private ordinary functions
Function, (setf polymorph-parameters-max-args): Private ordinary functions
Function, (setf polymorph-parameters-min-args): Private ordinary functions
Function, (setf polymorph-parameters-optional): Private ordinary functions
Function, (setf polymorph-parameters-required): Private ordinary functions
Function, (setf polymorph-parameters-rest): Private ordinary functions
Function, (setf polymorph-parameters-validator-form): Private ordinary functions
Function, (setf polymorph-return-type): Private ordinary functions
Function, (setf polymorph-runtime-applicable-p-form): Private ordinary functions
Function, (setf polymorph-source): Private ordinary functions
Function, (setf polymorph-static-dispatch-name): Private ordinary functions
Function, (setf polymorph-suboptimal-note): Private ordinary functions
Function, (setf polymorph-type-list): Private ordinary functions
Function, (setf pp-default-value-form): Private ordinary functions
Function, (setf pp-form-in-pf): Private ordinary functions
Function, (setf pp-local-name): Private ordinary functions
Function, (setf pp-supplied-p-name): Private ordinary functions
Function, (setf pp-type-parameters): Private ordinary functions
Function, (setf pp-value-effective-type): Private ordinary functions
Function, (setf pp-value-type): Private ordinary functions
Function, (setf type-parameter-compile-time-deparameterizer-lambda): Private ordinary functions
Function, (setf type-parameter-compile-time-deparameterizer-lambda-body): Private ordinary functions
Function, (setf type-parameter-name): Private ordinary functions
Function, (setf type-parameter-run-time-deparameterizer-lambda-body): Private ordinary functions
Function, accepts-argument-of-type-p: Private ordinary functions
Function, add-or-update-polymorph: Private ordinary functions
Function, blockify-name: Private ordinary functions
Function, cl-type-specifier-p: Public ordinary functions
Function, compiler-applicable-p-lambda-body: Private ordinary functions
Function, compiler-retrieve-polymorph: Private ordinary functions
Function, copy-polymorph: Private ordinary functions
Function, copy-polymorph-parameter: Private ordinary functions
Function, copy-polymorph-parameters: Private ordinary functions
Function, copy-type-parameter: Private ordinary functions
Function, csubtypep: Private ordinary functions
Function, csupertypep: Private ordinary functions
Function, ctype=: Private ordinary functions
Function, definitive-subtypep: Public ordinary functions
Function, deparameterize-type: Private ordinary functions
Function, enhanced-lambda-declarations: Private ordinary functions
Function, ensure-type-form: Private ordinary functions
Function, ensure-unambiguous-call: Private ordinary functions
Function, extended-subtypep: Private ordinary functions
Function, extended-type-list-p: Private ordinary functions
Function, extended-type-specifier-p: Public ordinary functions
Function, extract-declarations: Private ordinary functions
Function, find-polymorph: Public ordinary functions
Function, ftype-for-static-dispatch: Private ordinary functions
Function, invalidate-polymorphic-function-lambda: Private ordinary functions
Function, lambda-declarations: Private ordinary functions
Function, lambda-list-type: Private ordinary functions
Function, lambda-list-type-p: Private ordinary functions
Function, macroexpand-all: Private ordinary functions
Function, make-polymorph: Private ordinary functions
Function, make-polymorph-parameter: Private ordinary functions
Function, make-polymorph-parameters: Private ordinary functions
Function, make-polymorph-parameters-from-lambda-lists: Private ordinary functions
Function, make-sbcl-transform-body: Private ordinary functions
Function, make-type-parameter: Private ordinary functions
Function, map-polymorph-parameters: Private ordinary functions
Function, most-specialized-applicable-transform-p: Private ordinary functions
Function, no-applicable-polymorph: Public ordinary functions
Function, normalize-typed-lambda-list: Private ordinary functions
Function, note-no-inline: Private ordinary functions
Function, note-null-env: Private ordinary functions
Function, null-env-compilation-warnings: Private ordinary functions
Function, parametric-type-parameters: Private ordinary functions
Function, parametric-type-specifier-p: Private ordinary functions
Function, parametric-type-symbol-p: Private ordinary functions
Function, pf-compiler-macro: Private ordinary functions
Function, policy-quality: Private ordinary functions
Function, polymorph-apropos-list-type: Public ordinary functions
Function, polymorph-compiler-applicable-p-lambda: Private ordinary functions
Function, polymorph-compiler-macro-lambda: Private ordinary functions
Function, polymorph-compiler-macro-source: Private ordinary functions
Function, polymorph-documentation: Private ordinary functions
Function, polymorph-effective-lambda-list: Private ordinary functions
Function, polymorph-effective-type-list: Private ordinary functions
Function, polymorph-inline-lambda-body: Private ordinary functions
Function, polymorph-inline-p: Private ordinary functions
Function, polymorph-lambda-list-type: Private ordinary functions
Function, polymorph-more-optimal-type-list: Private ordinary functions
Function, polymorph-name: Private ordinary functions
Function, polymorph-p: Private ordinary functions
Function, polymorph-parameter-p: Private ordinary functions
Function, polymorph-parameters: Private ordinary functions
Function, polymorph-parameters-keyword: Private ordinary functions
Function, polymorph-parameters-max-args: Private ordinary functions
Function, polymorph-parameters-min-args: Private ordinary functions
Function, polymorph-parameters-optional: Private ordinary functions
Function, polymorph-parameters-p: Private ordinary functions
Function, polymorph-parameters-required: Private ordinary functions
Function, polymorph-parameters-rest: Private ordinary functions
Function, polymorph-parameters-validator-form: Private ordinary functions
Function, polymorph-return-type: Private ordinary functions
Function, polymorph-runtime-applicable-p-form: Private ordinary functions
Function, polymorph-source: Private ordinary functions
Function, polymorph-static-dispatch-name: Private ordinary functions
Function, polymorph-suboptimal-note: Private ordinary functions
Function, polymorph-type-list: Private ordinary functions
Function, polymorphic-function-effective-type-lists: Private ordinary functions
Function, polymorphic-function-make-effective-lambda-list: Private ordinary functions
Function, polymorphic-function-type-lists: Public ordinary functions
Function, potential-type-of-lambda-list: Private ordinary functions
Function, pp-default-value-form: Private ordinary functions
Function, pp-form-in-pf: Private ordinary functions
Function, pp-local-name: Private ordinary functions
Function, pp-supplied-p-name: Private ordinary functions
Function, pp-type-parameters: Private ordinary functions
Function, pp-value-effective-type: Private ordinary functions
Function, pp-value-type: Private ordinary functions
Function, recursive-function-p: Private ordinary functions
Function, register-polymorph: Private ordinary functions
Function, register-polymorph-compiler-macro: Private ordinary functions
Function, register-polymorphic-function: Private ordinary functions
Function, remove-polymorph: Private ordinary functions
Function, retrieve-polymorph-compiler-macro: Private ordinary functions
Function, run-time-applicable-p-form: Private ordinary functions
Function, sbcl-transform-arg-lvars-from-lambda-list-form: Private ordinary functions
Function, setf-function-name-p: Private ordinary functions
Function, simple-deparameterize-type: Private ordinary functions
Function, subtypep: Public ordinary functions
Function, subtypep-using-subtypep-alist: Private ordinary functions
Function, supertypep: Public ordinary functions
Function, translate-body: Private ordinary functions
Function, traverse-tree: Private ordinary functions
Function, type-list-compatible-p: Private ordinary functions
Function, type-list-intersection-null-p: Private ordinary functions
Function, type-list-more-specific-p: Private ordinary functions
Function, type-list-order-keywords: Private ordinary functions
Function, type-list-p: Private ordinary functions
Function, type-pair-=: Public ordinary functions
Function, type-parameter-compile-time-deparameterizer-lambda: Private ordinary functions
Function, type-parameter-compile-time-deparameterizer-lambda-body: Private ordinary functions
Function, type-parameter-name: Private ordinary functions
Function, type-parameter-p: Private ordinary functions
Function, type-parameter-run-time-deparameterizer-lambda-body: Private ordinary functions
Function, type-parameters-from-parametric-type: Private ordinary functions
Function, type-specifier-p: Public ordinary functions
Function, type=: Public ordinary functions
Function, typed-lambda-list-p: Private ordinary functions
Function, typep: Public ordinary functions
Function, typexpand: Private ordinary functions
Function, undefine-polymorphic-function: Public ordinary functions
Function, undefpolymorph: Public ordinary functions
Function, untyped-lambda-list: Private ordinary functions
Function, untyped-lambda-list-p: Private ordinary functions
Function, update-polymorphic-function-lambda: Private ordinary functions
Function, upgrade-extended-type: Public ordinary functions
Function, valid-parameter-name-p: Private ordinary functions

G
Generic Function, %deparameterize-type: Public generic functions
Generic Function, %lambda-list-type: Private generic functions
Generic Function, %sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
Generic Function, %type-list-compatible-p: Private generic functions
Generic Function, %type-list-intersection-null-p: Private generic functions
Generic Function, %type-list-more-specific-p: Private generic functions
Generic Function, (setf polymorphic-function-invalidated-p): Private generic functions
Generic Function, (setf polymorphic-function-polymorphs): Private generic functions
Generic Function, arg-types: Private generic functions
Generic Function, args: Private generic functions
Generic Function, compute-polymorphic-function-lambda-body: Private generic functions
Generic Function, condition-datum: Private generic functions
Generic Function, csubtypep-type: Private generic functions
Generic Function, csupertypep-type: Private generic functions
Generic Function, ctype=-type: Private generic functions
Generic Function, effective-type-lists: Private generic functions
Generic Function, form: Private generic functions
Generic Function, more-optimal-type-list: Private generic functions
Generic Function, name: Private generic functions
Generic Function, new-lambda-list: Private generic functions
Generic Function, parametric-type-compile-time-lambda: Private generic functions
Generic Function, parametric-type-compile-time-lambda-body: Public generic functions
Generic Function, parametric-type-run-time-lambda-body: Public generic functions
Generic Function, polymorphic-function-default: Private generic functions
Generic Function, polymorphic-function-effective-lambda-list: Private generic functions
Generic Function, polymorphic-function-invalidated-p: Private generic functions
Generic Function, polymorphic-function-lambda-list: Private generic functions
Generic Function, polymorphic-function-lambda-list-type: Private generic functions
Generic Function, polymorphic-function-name: Private generic functions
Generic Function, polymorphic-function-polymorphs: Private generic functions
Generic Function, polymorphic-function-source: Private generic functions
Generic Function, type-list: Private generic functions
Generic Function, upgraded-extended-type: Private generic functions
gf-lock: Private standalone methods

I
ignoring-error-output: Private macros
invalidate-polymorphic-function-lambda: Private ordinary functions
is-error: Private macros

L
lambda-declarations: Private ordinary functions
lambda-list-type: Private ordinary functions
lambda-list-type-p: Private ordinary functions
list-named-lambda: Private macros

M
Macro, catch-condition: Private macros
Macro, define-compiled-function: Private macros
Macro, define-lambda-list-helper: Private macros
Macro, define-polymorphic-function: Public macros
Macro, defpackage: Public macros
Macro, defpolymorph: Public macros
Macro, defpolymorph-compiler-macro: Public macros
Macro, ignoring-error-output: Private macros
Macro, is-error: Private macros
Macro, list-named-lambda: Private macros
Macro, time-it: Private macros
Macro, time-it/normalize: Private macros
Macro, with-muffled-compilation-warnings: Private macros
macroexpand-all: Private ordinary functions
make-polymorph: Private ordinary functions
make-polymorph-parameter: Private ordinary functions
make-polymorph-parameters: Private ordinary functions
make-polymorph-parameters-from-lambda-lists: Private ordinary functions
make-sbcl-transform-body: Private ordinary functions
make-type-parameter: Private ordinary functions
map-polymorph-parameters: Private ordinary functions
Method, %deparameterize-type: Public generic functions
Method, %deparameterize-type: Public generic functions
Method, %deparameterize-type: Public generic functions
Method, %deparameterize-type: Public generic functions
Method, %deparameterize-type: Public generic functions
Method, %deparameterize-type: Public generic functions
Method, %deparameterize-type: Public generic functions
Method, %lambda-list-type: Private generic functions
Method, %lambda-list-type: Private generic functions
Method, %lambda-list-type: Private generic functions
Method, %lambda-list-type: Private generic functions
Method, %lambda-list-type: Private generic functions
Method, %sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
Method, %sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
Method, %sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
Method, %sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
Method, %sbcl-transform-arg-lvars-from-lambda-list-form: Private generic functions
Method, %type-list-compatible-p: Private generic functions
Method, %type-list-compatible-p: Private generic functions
Method, %type-list-compatible-p: Private generic functions
Method, %type-list-compatible-p: Private generic functions
Method, %type-list-compatible-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-intersection-null-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, %type-list-more-specific-p: Private generic functions
Method, (setf polymorphic-function-invalidated-p): Private generic functions
Method, (setf polymorphic-function-polymorphs): Private generic functions
Method, arg-types: Private generic functions
Method, args: Private generic functions
Method, compute-polymorphic-function-lambda-body: Private generic functions
Method, compute-polymorphic-function-lambda-body: Private generic functions
Method, compute-polymorphic-function-lambda-body: Private generic functions
Method, compute-polymorphic-function-lambda-body: Private generic functions
Method, condition-datum: Private generic functions
Method, conjoin/2: Public standalone methods
Method, conjoin/2: Public standalone methods
Method, csubtypep-type: Private generic functions
Method, csupertypep-type: Private generic functions
Method, ctype=: Public standalone methods
Method, ctype=: Public standalone methods
Method, ctype=: Public standalone methods
Method, ctype=-type: Private generic functions
Method, ctypep: Public standalone methods
Method, ctypep: Public standalone methods
Method, ctypep: Public standalone methods
Method, effective-type-lists: Private generic functions
Method, form: Private generic functions
Method, gf-lock: Private standalone methods
Method, more-optimal-type-list: Private generic functions
Method, name: Private generic functions
Method, name: Private generic functions
Method, name: Private generic functions
Method, name: Private generic functions
Method, new-lambda-list: Private generic functions
Method, parametric-type-compile-time-lambda-body: Public generic functions
Method, parametric-type-run-time-lambda-body: Public generic functions
Method, polymorphic-function-default: Private generic functions
Method, polymorphic-function-effective-lambda-list: Private generic functions
Method, polymorphic-function-invalidated-p: Private generic functions
Method, polymorphic-function-lambda-list: Private generic functions
Method, polymorphic-function-lambda-list-type: Private generic functions
Method, polymorphic-function-name: Private generic functions
Method, polymorphic-function-polymorphs: Private generic functions
Method, polymorphic-function-source: Private generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, subctypep: Public standalone methods
Method, type-list: Private generic functions
Method, type-list: Private generic functions
Method, unparse: Public standalone methods
Method, unparse: Public standalone methods
Method, unparse: Public standalone methods
Method, upgraded-extended-type: Private generic functions
Method, upgraded-extended-type: Private generic functions
Method, upgraded-extended-type: Private generic functions
Method, upgraded-extended-type: Private generic functions
more-optimal-type-list: Private generic functions
more-optimal-type-list: Private generic functions
most-specialized-applicable-transform-p: Private ordinary functions

N
name: Private generic functions
name: Private generic functions
name: Private generic functions
name: Private generic functions
name: Private generic functions
new-lambda-list: Private generic functions
new-lambda-list: Private generic functions
no-applicable-polymorph: Public ordinary functions
normalize-typed-lambda-list: Private ordinary functions
note-no-inline: Private ordinary functions
note-null-env: Private ordinary functions
null-env-compilation-warnings: Private ordinary functions

P
parametric-type-compile-time-lambda: Private generic functions
parametric-type-compile-time-lambda-body: Public generic functions
parametric-type-compile-time-lambda-body: Public generic functions
parametric-type-parameters: Private ordinary functions
parametric-type-run-time-lambda-body: Public generic functions
parametric-type-run-time-lambda-body: Public generic functions
parametric-type-specifier-p: Private ordinary functions
parametric-type-symbol-p: Private ordinary functions
pf-compiler-macro: Private ordinary functions
policy-quality: Private ordinary functions
polymorph-apropos-list-type: Public ordinary functions
polymorph-compiler-applicable-p-lambda: Private ordinary functions
polymorph-compiler-macro-lambda: Private ordinary functions
polymorph-compiler-macro-source: Private ordinary functions
polymorph-documentation: Private ordinary functions
polymorph-effective-lambda-list: Private ordinary functions
polymorph-effective-type-list: Private ordinary functions
polymorph-inline-lambda-body: Private ordinary functions
polymorph-inline-p: Private ordinary functions
polymorph-lambda-list-type: Private ordinary functions
polymorph-more-optimal-type-list: Private ordinary functions
polymorph-name: Private ordinary functions
polymorph-p: Private ordinary functions
polymorph-parameter-p: Private ordinary functions
polymorph-parameters: Private ordinary functions
polymorph-parameters-keyword: Private ordinary functions
polymorph-parameters-max-args: Private ordinary functions
polymorph-parameters-min-args: Private ordinary functions
polymorph-parameters-optional: Private ordinary functions
polymorph-parameters-p: Private ordinary functions
polymorph-parameters-required: Private ordinary functions
polymorph-parameters-rest: Private ordinary functions
polymorph-parameters-validator-form: Private ordinary functions
polymorph-return-type: Private ordinary functions
polymorph-runtime-applicable-p-form: Private ordinary functions
polymorph-source: Private ordinary functions
polymorph-static-dispatch-name: Private ordinary functions
polymorph-suboptimal-note: Private ordinary functions
polymorph-type-list: Private ordinary functions
polymorphic-function-default: Private generic functions
polymorphic-function-default: Private generic functions
polymorphic-function-effective-lambda-list: Private generic functions
polymorphic-function-effective-lambda-list: Private generic functions
polymorphic-function-effective-type-lists: Private ordinary functions
polymorphic-function-invalidated-p: Private generic functions
polymorphic-function-invalidated-p: Private generic functions
polymorphic-function-lambda-list: Private generic functions
polymorphic-function-lambda-list: Private generic functions
polymorphic-function-lambda-list-type: Private generic functions
polymorphic-function-lambda-list-type: Private generic functions
polymorphic-function-make-effective-lambda-list: Private ordinary functions
polymorphic-function-name: Private generic functions
polymorphic-function-name: Private generic functions
polymorphic-function-polymorphs: Private generic functions
polymorphic-function-polymorphs: Private generic functions
polymorphic-function-source: Private generic functions
polymorphic-function-source: Private generic functions
polymorphic-function-type-lists: Public ordinary functions
potential-type-of-lambda-list: Private ordinary functions
pp-default-value-form: Private ordinary functions
pp-form-in-pf: Private ordinary functions
pp-local-name: Private ordinary functions
pp-supplied-p-name: Private ordinary functions
pp-type-parameters: Private ordinary functions
pp-value-effective-type: Private ordinary functions
pp-value-type: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods

R
recursive-function-p: Private ordinary functions
register-polymorph: Private ordinary functions
register-polymorph-compiler-macro: Private ordinary functions
register-polymorphic-function: Private ordinary functions
remove-polymorph: Private ordinary functions
retrieve-polymorph-compiler-macro: Private ordinary functions
run-time-applicable-p-form: Private ordinary functions

S
sbcl-transform-arg-lvars-from-lambda-list-form: Private ordinary functions
setf-function-name-p: Private ordinary functions
simple-deparameterize-type: Private ordinary functions
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subctypep: Public standalone methods
subtypep: Public compiler macros
subtypep: Public ordinary functions
subtypep-using-subtypep-alist: Private ordinary functions
supertypep: Public compiler macros
supertypep: Public ordinary functions

T
time-it: Private macros
time-it/normalize: Private macros
translate-body: Private ordinary functions
traverse-tree: Private ordinary functions
type-list: Private generic functions
type-list: Private generic functions
type-list: Private generic functions
type-list-compatible-p: Private ordinary functions
type-list-intersection-null-p: Private ordinary functions
type-list-more-specific-p: Private ordinary functions
type-list-order-keywords: Private ordinary functions
type-list-p: Private ordinary functions
type-pair-=: Public ordinary functions
type-parameter-compile-time-deparameterizer-lambda: Private ordinary functions
type-parameter-compile-time-deparameterizer-lambda-body: Private ordinary functions
type-parameter-name: Private ordinary functions
type-parameter-p: Private ordinary functions
type-parameter-run-time-deparameterizer-lambda-body: Private ordinary functions
type-parameters-from-parametric-type: Private ordinary functions
type-specifier-p: Public ordinary functions
type=: Public ordinary functions
typed-lambda-list-p: Private ordinary functions
typep: Public compiler macros
typep: Public ordinary functions
typexpand: Private ordinary functions

U
undefine-polymorphic-function: Public ordinary functions
undefpolymorph: Public ordinary functions
unparse: Public standalone methods
unparse: Public standalone methods
unparse: Public standalone methods
untyped-lambda-list: Private ordinary functions
untyped-lambda-list-p: Private ordinary functions
update-polymorphic-function-lambda: Private ordinary functions
upgrade-extended-type: Public ordinary functions
upgraded-extended-type: Private generic functions
upgraded-extended-type: Private generic functions
upgraded-extended-type: Private generic functions
upgraded-extended-type: Private generic functions
upgraded-extended-type: Private generic functions

V
valid-parameter-name-p: Private ordinary functions

W
with-muffled-compilation-warnings: Private macros

Jump to:   %   (  
A   B   C   D   E   F   G   I   L   M   N   P   R   S   T   U   V   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   %   *   +  
A   C   D   E   F   I   K   L   M   N   O   P   R   S   T   V  
Index Entry  Section

%
%lock: Public classes
%type: Private classes
%type: Private classes
%type: Private classes

*
*compiler-macro-expanding-p*: Public special variables
*disable-static-dispatch*: Public special variables
*environment*: Private special variables
*extended-subtypep-functions*: Public special variables
*extended-type-specifiers*: Private special variables
*lambda-list*: Private special variables
*lambda-list-typed-p*: Private special variables
*name*: Private special variables
*parametric-type-symbol-predicates*: Public special variables
*potential-type*: Private special variables
*subtypep-alist*: Public special variables

+
+compute-effective-lambda-list-doc+: Private constants
+compute-polymorphic-function-lambda-body-doc+: Private constants
+effective-lambda-list-doc-helper+: Private constants
+lambda-declarations-doc+: Private constants
+lambda-list-type-doc+: Private constants
+lambda-list-types+: Private constants
+sbcl-transform-arg-lvars-from-lambda-list-form+: Private constants
+type-list-intersection-null-p+: Private constants
+type-list-more-specific-p+: Private constants

A
actual: Private conditions
actual: Private conditions
arg-types: Public conditions
args: Public conditions

C
compile-time-deparameterizer-lambda: Private structures
compile-time-deparameterizer-lambda-body: Private structures
compiler-applicable-p-lambda: Public structures
compiler-macro-lambda: Public structures
compiler-macro-source: Public structures
Constant, +compute-effective-lambda-list-doc+: Private constants
Constant, +compute-polymorphic-function-lambda-body-doc+: Private constants
Constant, +effective-lambda-list-doc-helper+: Private constants
Constant, +lambda-declarations-doc+: Private constants
Constant, +lambda-list-type-doc+: Private constants
Constant, +lambda-list-types+: Private constants
Constant, +sbcl-transform-arg-lvars-from-lambda-list-form+: Private constants
Constant, +type-list-intersection-null-p+: Private constants
Constant, +type-list-more-specific-p+: Private constants

D
datum: Private conditions
declared: Private conditions
default: Public classes
default-value-form: Private structures
documentation: Public structures
documentation: Public classes

E
effective-lambda-list: Public classes
effective-type-list: Public structures
effective-type-lists: Public conditions
expected: Private conditions

F
form: Private conditions
form-in-pf: Private structures

I
index: Private conditions
inline-lambda-body: Public structures
inline-p: Public structures
invalidated-p: Public classes

K
keyword: Private structures

L
lambda-list: Public classes
lambda-list-type: Public structures
lambda-list-type: Public classes
local-name: Private structures

M
max: Private conditions
max-args: Private structures
min: Private conditions
min-args: Private structures
more-optimal-type-list: Public conditions
more-optimal-type-list: Public structures

N
name: Public conditions
name: Public structures
name: Public classes
name: Private conditions
name: Private conditions
name: Private conditions
name: Private structures
new-lambda-list: Private conditions

O
optim-debug: Private symbol macros
optim-safety: Private symbol macros
optim-slight-speed: Private symbol macros
optim-speed: Private symbol macros
optional: Private structures

P
parameters: Public structures
polymorphs: Public classes

R
required: Private structures
rest: Private structures
return-type: Public structures
run-time-deparameterizer-lambda-body: Private structures
runtime-applicable-p-form: Public structures

S
Slot, %lock: Public classes
Slot, %type: Private classes
Slot, %type: Private classes
Slot, %type: Private classes
Slot, actual: Private conditions
Slot, actual: Private conditions
Slot, arg-types: Public conditions
Slot, args: Public conditions
Slot, compile-time-deparameterizer-lambda: Private structures
Slot, compile-time-deparameterizer-lambda-body: Private structures
Slot, compiler-applicable-p-lambda: Public structures
Slot, compiler-macro-lambda: Public structures
Slot, compiler-macro-source: Public structures
Slot, datum: Private conditions
Slot, declared: Private conditions
Slot, default: Public classes
Slot, default-value-form: Private structures
Slot, documentation: Public structures
Slot, documentation: Public classes
Slot, effective-lambda-list: Public classes
Slot, effective-type-list: Public structures
Slot, effective-type-lists: Public conditions
Slot, expected: Private conditions
Slot, form: Private conditions
Slot, form-in-pf: Private structures
Slot, index: Private conditions
Slot, inline-lambda-body: Public structures
Slot, inline-p: Public structures
Slot, invalidated-p: Public classes
Slot, keyword: Private structures
Slot, lambda-list: Public classes
Slot, lambda-list-type: Public structures
Slot, lambda-list-type: Public classes
Slot, local-name: Private structures
Slot, max: Private conditions
Slot, max-args: Private structures
Slot, min: Private conditions
Slot, min-args: Private structures
Slot, more-optimal-type-list: Public conditions
Slot, more-optimal-type-list: Public structures
Slot, name: Public conditions
Slot, name: Public structures
Slot, name: Public classes
Slot, name: Private conditions
Slot, name: Private conditions
Slot, name: Private conditions
Slot, name: Private structures
Slot, new-lambda-list: Private conditions
Slot, optional: Private structures
Slot, parameters: Public structures
Slot, polymorphs: Public classes
Slot, required: Private structures
Slot, rest: Private structures
Slot, return-type: Public structures
Slot, run-time-deparameterizer-lambda-body: Private structures
Slot, runtime-applicable-p-form: Public structures
Slot, source: Public structures
Slot, source: Public classes
Slot, static-dispatch-name: Public structures
Slot, suboptimal-note: Public structures
Slot, supplied-p-name: Private structures
Slot, type-list: Public conditions
Slot, type-list: Public structures
Slot, type-list: Private conditions
Slot, type-parameters: Private structures
Slot, type1: Private conditions
Slot, type2: Private conditions
Slot, validator-form: Private structures
Slot, value-effective-type: Private structures
Slot, value-type: Private structures
source: Public structures
source: Public classes
Special Variable, *compiler-macro-expanding-p*: Public special variables
Special Variable, *disable-static-dispatch*: Public special variables
Special Variable, *environment*: Private special variables
Special Variable, *extended-subtypep-functions*: Public special variables
Special Variable, *extended-type-specifiers*: Private special variables
Special Variable, *lambda-list*: Private special variables
Special Variable, *lambda-list-typed-p*: Private special variables
Special Variable, *name*: Private special variables
Special Variable, *parametric-type-symbol-predicates*: Public special variables
Special Variable, *potential-type*: Private special variables
Special Variable, *subtypep-alist*: Public special variables
static-dispatch-name: Public structures
suboptimal-note: Public structures
supplied-p-name: Private structures
Symbol Macro, optim-debug: Private symbol macros
Symbol Macro, optim-safety: Private symbol macros
Symbol Macro, optim-slight-speed: Private symbol macros
Symbol Macro, optim-speed: Private symbol macros

T
type-list: Public conditions
type-list: Public structures
type-list: Private conditions
type-parameters: Private structures
type1: Private conditions
type2: Private conditions

V
validator-form: Private structures
value-effective-type: Private structures
value-type: Private structures

Jump to:   %   *   +  
A   C   D   E   F   I   K   L   M   N   O   P   R   S   T   V  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   D   E   F   L   M   N   P   R   S   T   U  
Index Entry  Section

B
base.lisp: The polymorphic-functions/lambda-lists/base․lisp file
benchmark.lisp: The polymorphic-functions/benchmark․lisp file

C
Class, csubtypep: Private classes
Class, csupertypep: Private classes
Class, ctype=: Private classes
Class, polymorphic-function: Public classes
compiler-macro.lisp: The polymorphic-functions/compiler-macro․lisp file
Condition, defpolymorph-note: Private conditions
Condition, form-type-failure: Private conditions
Condition, lambda-list-has-changed: Private conditions
Condition, more-optimal-polymorph-inapplicable: Public conditions
Condition, no-applicable-polymorph: Public conditions
Condition, no-applicable-polymorph/compiler-note: Private conditions
Condition, no-applicable-polymorph/error: Private conditions
Condition, not-a-ahp: Private conditions
Condition, polymorph-has-no-inline-lambda-body: Private conditions
Condition, return-type-count-mismatch: Private conditions
Condition, return-type-count-mismatch/warning: Private conditions
Condition, return-type-mismatch: Private conditions
Condition, return-type-mismatch/error: Private conditions
Condition, return-type-mismatch/warning: Private conditions
Condition, suboptimal-polymorph-note: Public conditions
Condition, subtypep-not-known: Private conditions
conditions.lisp: The polymorphic-functions/conditions․lisp file
core.lisp: The polymorphic-functions/extended-types/core․lisp file
csubtypep: Private classes
csupertypep: Private classes
ctype=: Private classes

D
defpolymorph-note: Private conditions
deparameterize-type.lisp: The polymorphic-functions/extended-types/deparameterize-type․lisp file
dispatch.lisp: The polymorphic-functions/dispatch․lisp file
doc.lisp: The polymorphic-functions/lambda-lists/doc․lisp file

E
ensure-type-form.lisp: The polymorphic-functions/extended-types/ensure-type-form․lisp file
extended-type-specifier: Private types
extended-types: The polymorphic-functions/extended-types module

F
File, base.lisp: The polymorphic-functions/lambda-lists/base․lisp file
File, benchmark.lisp: The polymorphic-functions/benchmark․lisp file
File, compiler-macro.lisp: The polymorphic-functions/compiler-macro․lisp file
File, conditions.lisp: The polymorphic-functions/conditions․lisp file
File, core.lisp: The polymorphic-functions/extended-types/core․lisp file
File, deparameterize-type.lisp: The polymorphic-functions/extended-types/deparameterize-type․lisp file
File, dispatch.lisp: The polymorphic-functions/dispatch․lisp file
File, doc.lisp: The polymorphic-functions/lambda-lists/doc․lisp file
File, ensure-type-form.lisp: The polymorphic-functions/extended-types/ensure-type-form․lisp file
File, misc-tests.lisp: The polymorphic-functions/misc-tests․lisp file
File, package.lisp: The polymorphic-functions/package․lisp file
File, parameters.lisp: The polymorphic-functions/lambda-lists/parameters․lisp file
File, parametric-types.lisp: The polymorphic-functions/extended-types/parametric-types․lisp file
File, polymorphic-function.lisp: The polymorphic-functions/polymorphic-function․lisp file
File, polymorphic-functions.asd: The polymorphic-functions/polymorphic-functions․asd file
File, pre-package.lisp: The polymorphic-functions/pre-package․lisp file
File, required-key.lisp: The polymorphic-functions/lambda-lists/required-key․lisp file
File, required-optional.lisp: The polymorphic-functions/lambda-lists/required-optional․lisp file
File, required.lisp: The polymorphic-functions/lambda-lists/required․lisp file
File, rest.lisp: The polymorphic-functions/lambda-lists/rest․lisp file
File, sbcl-transform.lisp: The polymorphic-functions/sbcl-transform․lisp file
File, subtypep.lisp: The polymorphic-functions/extended-types/subtypep․lisp file
File, supertypep.lisp: The polymorphic-functions/extended-types/supertypep․lisp file
File, type=.lisp: The polymorphic-functions/extended-types/type=․lisp file
File, types.lisp: The polymorphic-functions/types․lisp file
form-type-failure: Private conditions
function-name: Private types

L
lambda-list-has-changed: Private conditions
lambda-list-type: Private types
lambda-lists: The polymorphic-functions/lambda-lists module

M
misc-tests.lisp: The polymorphic-functions/misc-tests․lisp file
Module, extended-types: The polymorphic-functions/extended-types module
Module, lambda-lists: The polymorphic-functions/lambda-lists module
more-optimal-polymorph-inapplicable: Public conditions

N
no-applicable-polymorph: Public conditions
no-applicable-polymorph/compiler-note: Private conditions
no-applicable-polymorph/error: Private conditions
not-a-ahp: Private conditions

P
Package, polymorphic-functions: The polymorphic-functions package
Package, polymorphic-functions.defpackage: The polymorphic-functions․defpackage package
Package, polymorphic-functions.extended-types: The polymorphic-functions․extended-types package
Package, polymorphic-functions.nonuser: The polymorphic-functions․nonuser package
package.lisp: The polymorphic-functions/package․lisp file
parameters.lisp: The polymorphic-functions/lambda-lists/parameters․lisp file
parametric-type-specifier: Private types
parametric-types.lisp: The polymorphic-functions/extended-types/parametric-types․lisp file
polymorph: Public structures
polymorph-has-no-inline-lambda-body: Private conditions
polymorph-parameter: Private structures
polymorph-parameters: Private structures
polymorphic-function: Public classes
polymorphic-function.lisp: The polymorphic-functions/polymorphic-function․lisp file
polymorphic-functions: The polymorphic-functions system
polymorphic-functions: The polymorphic-functions package
polymorphic-functions.asd: The polymorphic-functions/polymorphic-functions․asd file
polymorphic-functions.defpackage: The polymorphic-functions․defpackage package
polymorphic-functions.extended-types: The polymorphic-functions․extended-types package
polymorphic-functions.nonuser: The polymorphic-functions․nonuser package
pre-package.lisp: The polymorphic-functions/pre-package․lisp file

R
required-key.lisp: The polymorphic-functions/lambda-lists/required-key․lisp file
required-optional.lisp: The polymorphic-functions/lambda-lists/required-optional․lisp file
required.lisp: The polymorphic-functions/lambda-lists/required․lisp file
rest.lisp: The polymorphic-functions/lambda-lists/rest․lisp file
return-type-count-mismatch: Private conditions
return-type-count-mismatch/warning: Private conditions
return-type-mismatch: Private conditions
return-type-mismatch/error: Private conditions
return-type-mismatch/warning: Private conditions

S
sbcl-transform.lisp: The polymorphic-functions/sbcl-transform․lisp file
Structure, polymorph: Public structures
Structure, polymorph-parameter: Private structures
Structure, polymorph-parameters: Private structures
Structure, type-parameter: Private structures
suboptimal-polymorph-note: Public conditions
subtypep-not-known: Private conditions
subtypep.lisp: The polymorphic-functions/extended-types/subtypep․lisp file
supertypep.lisp: The polymorphic-functions/extended-types/supertypep․lisp file
System, polymorphic-functions: The polymorphic-functions system

T
Type, extended-type-specifier: Private types
Type, function-name: Private types
Type, lambda-list-type: Private types
Type, parametric-type-specifier: Private types
Type, type-list: Private types
Type, typed-lambda-list: Private types
Type, untyped-lambda-list: Private types
type-list: Private types
type-parameter: Private structures
type=.lisp: The polymorphic-functions/extended-types/type=․lisp file
typed-lambda-list: Private types
types.lisp: The polymorphic-functions/types․lisp file

U
untyped-lambda-list: Private types

Jump to:   B   C   D   E   F   L   M   N   P   R   S   T   U