The polymorphic-functions Reference Manual

Table of Contents

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

The polymorphic-functions Reference Manual

This is the polymorphic-functions Reference Manual, version 0.1.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Sun May 15 05:50:02 2022 GMT+0.


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

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]] (but 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 [[https://github.com/s-expressionists/ctype/][ctype]].

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-on-parametric-polymorphism][Could you elaborate 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.
- 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.

*** Could you elaborate on parametric-polymorphism?

Sure!

In addition to subtype-polymorphism described above (under [[#basic-usage][Basic Usage]]), PF also provides support for parametric-polymorphism. Note that 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 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]].
- 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.
- 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 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]]!


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

2 Systems

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


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

2.1 polymorphic-functions

Author

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

License

MIT

Description

Type based dispatch for Common Lisp

Version

0.1.0

Dependencies
Source

polymorphic-functions.asd (file)

Components

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

3 Modules

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


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

3.1 polymorphic-functions/extended-types

Dependency

package.lisp (file)

Parent

polymorphic-functions (system)

Location

extended-types/

Components

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

3.2 polymorphic-functions/lambda-lists

Dependency

extended-types (module)

Parent

polymorphic-functions (system)

Location

lambda-lists/

Components

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

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


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 polymorphic-functions.asd

Location

/home/quickref/quicklisp/dists/quicklisp/software/polymorphic-functions-20220331-git/polymorphic-functions.asd

Systems

polymorphic-functions (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 polymorphic-functions/pre-package.lisp

Parent

polymorphic-functions (system)

Location

pre-package.lisp

Packages

polymorphic-functions.defpackage

Exported Definitions

defpackage (macro)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 polymorphic-functions/package.lisp

Dependency

pre-package.lisp (file)

Parent

polymorphic-functions (system)

Location

package.lisp

Packages
Exported Definitions

cl-type-specifier-p (function)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Parent

extended-types (module)

Location

extended-types/parametric-types.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependency

parametric-types.lisp (file)

Parent

extended-types (module)

Location

extended-types/ensure-type-form.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependency

parametric-types.lisp (file)

Parent

extended-types (module)

Location

extended-types/core.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependency

parametric-types.lisp (file)

Parent

extended-types (module)

Location

extended-types/deparameterize-type.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependency

core.lisp (file)

Parent

extended-types (module)

Location

extended-types/supertypep.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependency

core.lisp (file)

Parent

extended-types (module)

Location

extended-types/type=.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependency

core.lisp (file)

Parent

extended-types (module)

Location

extended-types/subtypep.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.11 polymorphic-functions/lambda-lists/doc.lisp

Parent

lambda-lists (module)

Location

lambda-lists/doc.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Parent

lambda-lists (module)

Location

lambda-lists/parameters.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependencies
Parent

lambda-lists (module)

Location

lambda-lists/base.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependency

base.lisp (file)

Parent

lambda-lists (module)

Location

lambda-lists/required.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependency

base.lisp (file)

Parent

lambda-lists (module)

Location

lambda-lists/required-optional.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

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

Dependency

base.lisp (file)

Parent

lambda-lists (module)

Location

lambda-lists/required-key.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.17 polymorphic-functions/lambda-lists/rest.lisp

Dependency

base.lisp (file)

Parent

lambda-lists (module)

Location

lambda-lists/rest.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.18 polymorphic-functions/polymorphic-function.lisp

Dependencies
Parent

polymorphic-functions (system)

Location

polymorphic-function.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.19 polymorphic-functions/conditions.lisp

Dependency

extended-types (module)

Parent

polymorphic-functions (system)

Location

conditions.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.20 polymorphic-functions/compiler-macro.lisp

Dependencies
Parent

polymorphic-functions (system)

Location

compiler-macro.lisp

Exported Definitions

*disable-static-dispatch* (special variable)

Internal Definitions

pf-compiler-macro (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.21 polymorphic-functions/sbcl-transform.lisp

Dependencies
Parent

polymorphic-functions (system)

Location

sbcl-transform.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.22 polymorphic-functions/dispatch.lisp

Dependencies
Parent

polymorphic-functions (system)

Location

dispatch.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.23 polymorphic-functions/misc-tests.lisp

Dependency

dispatch.lisp (file)

Parent

polymorphic-functions (system)

Location

misc-tests.lisp

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.24 polymorphic-functions/benchmark.lisp

Dependency

misc-tests.lisp (file)

Parent

polymorphic-functions (system)

Location

benchmark.lisp

Internal Definitions

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

5 Packages

Packages are listed by definition order.


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

5.1 polymorphic-functions.defpackage

Source

pre-package.lisp (file)

Use List
Exported Definitions

defpackage (macro)


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

5.2 polymorphic-functions.extended-types

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5.3 polymorphic-functions.nonuser

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

Source

package.lisp (file)


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

5.4 polymorphic-functions

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

6 Definitions

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


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

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [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 (file)

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 (file)

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 (file)

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 (file)

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 (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

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 (file)

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 (file)

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).
- Possible values for INLINE are T, NIL and :MAYBE
- STATIC-DISPATCH-NAME could be useful for tracing or profiling

**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 (file)

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 (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Compiler macros

Compiler Macro: subtypep TYPE1 TYPE2 &optional ENV-FORM
Package

polymorphic-functions.extended-types

Source

core.lisp (file)

Compiler Macro: supertypep TYPE1 TYPE2 &optional ENVIRONMENT
Package

polymorphic-functions.extended-types

Source

core.lisp (file)

Compiler Macro: typep OBJECT TYPE &optional ENV-FORM
Package

polymorphic-functions.extended-types

Source

core.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 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 (file)

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 (file)

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 (file)

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 (file)

Function: no-applicable-polymorph NAME ENV ARGS &optional ARG-TYPES
Package

polymorphic-functions

Source

conditions.lisp (file)

Function: polymorph-apropos-list-type TYPE &key NAME PACKAGE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorphic-function-type-lists POLYMORPHIC-FUNCTION
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

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 (file)

Function: supertypep TYPE1 TYPE2 &optional ENVIRONMENT
Package

polymorphic-functions.extended-types

Source

core.lisp (file)

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 (file)

Function: type-specifier-p OBJECT &optional ENV
Package

polymorphic-functions.extended-types

Source

core.lisp (file)

Function: type= TYPE1 TYPE2 &optional ENV
Package

polymorphic-functions.extended-types

Source

core.lisp (file)

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 (file)

Function: undefine-polymorphic-function NAME

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

Package

polymorphic-functions

Source

dispatch.lisp (file)

Function: undefpolymorph NAME TYPE-LIST

Remove the POLYMORPH associated with NAME with TYPE-LIST

Package

polymorphic-functions

Source

dispatch.lisp (file)

Function: upgrade-extended-type EXTENDED-TYPE-SPECIFIER &optional ENV
Package

polymorphic-functions.extended-types

Source

core.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

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 (file)

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 (file)

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 (file)

Methods
Method: parametric-type-run-time-lambda-body (TYPE-CAR (eql array)) TYPE-CDR PARAMETER

Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.6 Conditions

Condition: no-applicable-polymorph ()
Package

polymorphic-functions

Source

conditions.lisp (file)

Direct superclasses

condition (condition)

Direct subclasses
Direct methods
Direct slots
Slot: name
Initargs

:name

Initform

(quote (error "name not specified"))

Readers

name (generic function)

Slot: args
Initargs

:args

Initform

(quote (error "args not specified"))

Readers

args (generic function)

Slot: arg-types
Initargs

:arg-types

Readers

arg-types (generic function)

Slot: effective-type-lists
Initargs

:effective-type-lists

Initform

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

Readers

effective-type-lists (generic function)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.7 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 APF-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.

Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

print-object (method)

Direct slots
Slot: documentation
Type

(or null string)

Readers

polymorph-documentation (function)

Writers

(setf polymorph-documentation) (function)

Slot: name
Initform

(error "name must be supplied!")

Readers

polymorph-name (function)

Writers

(setf polymorph-name) (function)

Slot: source
Readers

polymorph-source (function)

Writers

(setf polymorph-source) (function)

Slot: return-type
Readers

polymorph-return-type (function)

Writers

(setf polymorph-return-type) (function)

Slot: type-list
Readers

polymorph-type-list (function)

Writers

(setf polymorph-type-list) (function)

Slot: lambda-list-type
Readers

polymorph-lambda-list-type (function)

Writers

(setf polymorph-lambda-list-type) (function)

Slot: effective-type-list
Readers

polymorph-effective-type-list (function)

Writers

(setf polymorph-effective-type-list) (function)

Slot: compiler-applicable-p-lambda
Readers

polymorph-compiler-applicable-p-lambda (function)

Writers

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

Slot: runtime-applicable-p-form
Readers

polymorph-runtime-applicable-p-form (function)

Writers

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

Slot: inline-p
Readers

polymorph-inline-p (function)

Writers

(setf polymorph-inline-p) (function)

Slot: inline-lambda-body
Readers

polymorph-inline-lambda-body (function)

Writers

(setf polymorph-inline-lambda-body) (function)

Slot: static-dispatch-name
Readers

polymorph-static-dispatch-name (function)

Writers

(setf polymorph-static-dispatch-name) (function)

Slot: compiler-macro-lambda
Readers

polymorph-compiler-macro-lambda (function)

Writers

(setf polymorph-compiler-macro-lambda) (function)

Slot: compiler-macro-source
Readers

polymorph-compiler-macro-source (function)

Writers

(setf polymorph-compiler-macro-source) (function)

Slot: parameters
Type

polymorphic-functions::polymorph-parameters

Initform

(error "polymorph-parameters must be supplied")

Readers

polymorph-parameters (function)

Writers

(setf polymorph-parameters) (function)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.8 Classes

Class: polymorphic-function ()
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Direct superclasses

funcallable-standard-object (class)

Direct methods
Direct slots
Slot: name
Initargs

:name

Initform

(error "name must be supplied.")

Readers

polymorphic-function-name (generic function)

Slot: source
Initargs

:source

Readers

polymorphic-function-source (generic function)

Slot: lambda-list
Type

list

Initargs

:lambda-list

Initform

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

Readers

polymorphic-function-lambda-list (generic function)

Slot: effective-lambda-list
Type

list

Initargs

:effective-lambda-list

Initform

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

Readers

polymorphic-function-effective-lambda-list (generic function)

Slot: lambda-list-type
Type

polymorphic-functions::lambda-list-type

Initargs

:lambda-list-type

Initform

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

Readers

polymorphic-function-lambda-list-type (generic function)

Slot: default
Type

function

Initargs

:default

Initform

(error ":default must be supplied")

Readers

polymorphic-function-default (generic function)

Slot: polymorphs
Readers

polymorphic-function-polymorphs (generic function)

Writers

(setf polymorphic-function-polymorphs) (generic function)

Slot: documentation
Type

(or string null)

Initargs

:documentation

Slot: invalidated-p
Readers

polymorphic-function-invalidated-p (generic function)

Writers

(setf polymorphic-function-invalidated-p) (generic function)

Slot: %lock
Initform

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

Readers

gf-lock (generic function)


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

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Constants

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

polymorphic-functions

Source

doc.lisp (file)

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

polymorphic-functions

Source

doc.lisp (file)

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

polymorphic-functions

Source

doc.lisp (file)

Constant: +lambda-declarations-doc+
Package

polymorphic-functions

Source

doc.lisp (file)

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

polymorphic-functions

Source

doc.lisp (file)

Constant: +lambda-list-types+
Package

polymorphic-functions

Source

base.lisp (file)

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

polymorphic-functions

Source

doc.lisp (file)

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

polymorphic-functions

Source

doc.lisp (file)

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

polymorphic-functions

Source

doc.lisp (file)


Next: , Previous: , Up: Internal definitions   [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 (file)

Special Variable: *extended-type-specifiers*
Package

polymorphic-functions.extended-types

Source

core.lisp (file)

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 (file)

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 (file)

Special Variable: *name*

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

Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

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 (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Symbol macros

Symbol Macro: optim-debug
Package

polymorphic-functions

Source

package.lisp (file)

Expansion

(or (= 3 (polymorphic-functions::policy-quality (quote debug) polymorphic-functions::env)) (> (polymorphic-functions::policy-quality (quote debug) polymorphic-functions::env) (polymorphic-functions::policy-quality (quote speed) polymorphic-functions::env)))

Symbol Macro: optim-safety
Package

polymorphic-functions

Source

package.lisp (file)

Expansion

(= 3 (polymorphic-functions::policy-quality (quote safety) polymorphic-functions::env))

Symbol Macro: optim-slight-speed
Package

polymorphic-functions

Source

package.lisp (file)

Expansion

(and (/= 3 (polymorphic-functions::policy-quality (quote debug) polymorphic-functions::env)) (/= 3 (polymorphic-functions::policy-quality (quote speed) polymorphic-functions::env)) (<= (polymorphic-functions::policy-quality (quote debug) polymorphic-functions::env) (polymorphic-functions::policy-quality (quote speed) polymorphic-functions::env)))

Symbol Macro: optim-speed
Package

polymorphic-functions

Source

package.lisp (file)

Expansion

(and (/= 3 (polymorphic-functions::policy-quality (quote debug) polymorphic-functions::env)) (= 3 (polymorphic-functions::policy-quality (quote speed) polymorphic-functions::env)))


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Macros

Macro: catch-condition FORM
Package

polymorphic-functions

Source

package.lisp (file)

Macro: define-compiled-function NAME LAMBDA-LIST &body BODY
Package

polymorphic-functions

Source

misc-tests.lisp (file)

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 (file)

Macro: ignoring-error-output &body BODY
Package

polymorphic-functions

Source

misc-tests.lisp (file)

Macro: is-error FORM
Package

polymorphic-functions

Source

package.lisp (file)

Macro: list-named-lambda NAME PACKAGE LAMBDA-LIST &body BODY
Package

polymorphic-functions

Source

package.lisp (file)

Macro: time-it &body BODY
Package

polymorphic-functions

Source

benchmark.lisp (file)

Macro: time-it/normalize &body BODY
Package

polymorphic-functions

Source

benchmark.lisp (file)

Macro: with-muffled-compilation-warnings &body BODY
Package

polymorphic-functions

Source

dispatch.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Functions

Function: accepts-argument-of-type-p POLYMORPH-PARAMETERS TYPE
Package

polymorphic-functions

Source

parameters.lisp (file)

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 (file)

Function: blockify-name NAME
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: compiler-applicable-p-lambda-body POLYMORPH-PARAMETERS
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: compiler-retrieve-polymorph NAME &rest ARG-TYPES-ALIST
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: copy-polymorph INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: copy-polymorph-parameter INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: copy-polymorph-parameters INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: copy-type-parameter INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: csubtypep TYPE
Package

polymorphic-functions.extended-types

Source

subtypep.lisp (file)

Function: csupertypep TYPE
Package

polymorphic-functions.extended-types

Source

supertypep.lisp (file)

Function: ctype= TYPE
Package

polymorphic-functions.extended-types

Source

type=.lisp (file)

Function: deparameterize-type TYPE-SPECIFIER
Package

polymorphic-functions

Source

deparameterize-type.lisp (file)

Function: enhanced-lambda-declarations POLYMORPH-PARAMETERS ARG-TYPES &optional RETURN-TYPE
Package

polymorphic-functions

Source

parameters.lisp (file)

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 (file)

Function: ensure-unambiguous-call NAME TYPE-LIST EFFECTIVE-TYPE-LIST
Package

polymorphic-functions

Source

dispatch.lisp (file)

Function: extended-subtypep TYPE1 TYPE2 &optional ENVIRONMENT
Package

polymorphic-functions

Source

core.lisp (file)

Function: extended-type-list-p LIST
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: extract-declarations BODY

Returns two values: DECLARATIONS and remaining BODY

Package

polymorphic-functions

Source

dispatch.lisp (file)

Function: ftype-for-static-dispatch STATIC-DISPATCH-NAME EFFECTIVE-TYPE-LIST RETURN-TYPE ENV
Package

polymorphic-functions

Source

base.lisp (file)

Function: invalidate-polymorphic-function-lambda POLYMORPHIC-FUNCTION
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: lambda-declarations POLYMORPH-PARAMETERS
Package

polymorphic-functions

Source

parameters.lisp (file)

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 (file)

Function: lambda-list-type-p OBJECT

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

Package

polymorphic-functions

Source

base.lisp (file)

Function: macroexpand-all FORM &optional ENV
Package

polymorphic-functions

Source

package.lisp (file)

Function: make-polymorph &key (DOCUMENTATION DOCUMENTATION) (NAME NAME) (SOURCE SOURCE) (RETURN-TYPE RETURN-TYPE) (TYPE-LIST TYPE-LIST) (LAMBDA-LIST-TYPE LAMBDA-LIST-TYPE) (EFFECTIVE-TYPE-LIST EFFECTIVE-TYPE-LIST) (COMPILER-APPLICABLE-P-LAMBDA COMPILER-APPLICABLE-P-LAMBDA) (RUNTIME-APPLICABLE-P-FORM RUNTIME-APPLICABLE-P-FORM) (INLINE-P INLINE-P) (INLINE-LAMBDA-BODY INLINE-LAMBDA-BODY) (STATIC-DISPATCH-NAME STATIC-DISPATCH-NAME) (COMPILER-MACRO-LAMBDA COMPILER-MACRO-LAMBDA) (COMPILER-MACRO-SOURCE COMPILER-MACRO-SOURCE) (PARAMETERS PARAMETERS)
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: make-polymorph-parameter &key (LOCAL-NAME LOCAL-NAME) (FORM-IN-PF FORM-IN-PF) (VALUE-TYPE VALUE-TYPE) (DEFAULT-VALUE-FORM DEFAULT-VALUE-FORM) (SUPPLIED-P-NAME SUPPLIED-P-NAME) (TYPE-PARAMETERS TYPE-PARAMETERS) (VALUE-EFFECTIVE-TYPE VALUE-EFFECTIVE-TYPE)
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: make-polymorph-parameters &key (REQUIRED REQUIRED) (OPTIONAL OPTIONAL) (REST REST) (KEYWORD KEYWORD) (MIN-ARGS MIN-ARGS) (MAX-ARGS MAX-ARGS) (VALIDATOR-FORM VALIDATOR-FORM)
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: make-polymorph-parameters-from-lambda-lists POLYMORPHIC-FUNCTION-LAMBDA-LIST POLYMORPH-LAMBDA-LIST
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: make-sbcl-transform-body NAME TYPED-LAMBDA-LIST INLINE-LAMBDA-BODY POLYMORPH-PARAMETERS
Package

polymorphic-functions

Source

sbcl-transform.lisp (file)

Function: make-type-parameter &key (NAME NAME) (RUN-TIME-DEPARAMETERIZER-LAMBDA-BODY RUN-TIME-DEPARAMETERIZER-LAMBDA-BODY) (COMPILE-TIME-DEPARAMETERIZER-LAMBDA COMPILE-TIME-DEPARAMETERIZER-LAMBDA) (COMPILE-TIME-DEPARAMETERIZER-LAMBDA-BODY COMPILE-TIME-DEPARAMETERIZER-LAMBDA-BODY)
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: map-polymorph-parameters POLYMORPH-PARAMETERS &key REQUIRED OPTIONAL KEYWORD REST
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: most-specialized-applicable-transform-p NAME ARG-TYPES-ALIST TYPE-LIST
Package

polymorphic-functions

Source

sbcl-transform.lisp (file)

Function: normalize-typed-lambda-list TYPED-LAMBDA-LIST
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: note-no-inline FORM DATUM &rest ARGUMENTS
Package

polymorphic-functions

Source

conditions.lisp (file)

Function: note-null-env FORM DATUM &rest ARGUMENTS
Package

polymorphic-functions

Source

conditions.lisp (file)

Function: null-env-compilation-warnings LAMBDA-FORM
Package

polymorphic-functions

Source

dispatch.lisp (file)

Function: parametric-type-parameters PARAMETRIC-TYPE-SPEC
Package

polymorphic-functions

Source

parametric-types.lisp (file)

Function: parametric-type-specifier-p TYPE-SPECIFIER
Package

polymorphic-functions

Source

parametric-types.lisp (file)

Function: parametric-type-symbol-p ATOM
Package

polymorphic-functions

Source

parametric-types.lisp (file)

Function: pf-compiler-macro FORM &optional ENV
Package

polymorphic-functions

Source

compiler-macro.lisp (file)

Function: policy-quality QUALITY &optional ENV
Package

polymorphic-functions

Source

package.lisp (file)

Function: polymorph-compiler-applicable-p-lambda INSTANCE
Function: (setf polymorph-compiler-applicable-p-lambda) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-compiler-macro-lambda INSTANCE
Function: (setf polymorph-compiler-macro-lambda) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-compiler-macro-source INSTANCE
Function: (setf polymorph-compiler-macro-source) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-documentation INSTANCE
Function: (setf polymorph-documentation) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

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 (file)

Function: polymorph-effective-type-list INSTANCE
Function: (setf polymorph-effective-type-list) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-inline-lambda-body INSTANCE
Function: (setf polymorph-inline-lambda-body) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-inline-p INSTANCE
Function: (setf polymorph-inline-p) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-lambda-list-type INSTANCE
Function: (setf polymorph-lambda-list-type) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-name INSTANCE
Function: (setf polymorph-name) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-p OBJECT
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-parameter-p OBJECT
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: polymorph-parameters INSTANCE
Function: (setf polymorph-parameters) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-parameters-keyword INSTANCE
Function: (setf polymorph-parameters-keyword) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: polymorph-parameters-max-args INSTANCE
Function: (setf polymorph-parameters-max-args) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: polymorph-parameters-min-args INSTANCE
Function: (setf polymorph-parameters-min-args) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: polymorph-parameters-optional INSTANCE
Function: (setf polymorph-parameters-optional) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: polymorph-parameters-p OBJECT
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: polymorph-parameters-required INSTANCE
Function: (setf polymorph-parameters-required) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: polymorph-parameters-rest INSTANCE
Function: (setf polymorph-parameters-rest) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: polymorph-parameters-validator-form INSTANCE
Function: (setf polymorph-parameters-validator-form) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: polymorph-return-type INSTANCE
Function: (setf polymorph-return-type) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-runtime-applicable-p-form INSTANCE
Function: (setf polymorph-runtime-applicable-p-form) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-source INSTANCE
Function: (setf polymorph-source) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-static-dispatch-name INSTANCE
Function: (setf polymorph-static-dispatch-name) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorph-type-list INSTANCE
Function: (setf polymorph-type-list) VALUE INSTANCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorphic-function-effective-type-lists POLYMORPHIC-FUNCTION
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: polymorphic-function-make-effective-lambda-list UNTYPED-LAMBDA-LIST
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: potential-type-of-lambda-list LAMBDA-LIST
Package

polymorphic-functions

Source

base.lisp (file)

Function: pp-default-value-form INSTANCE
Function: (setf pp-default-value-form) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: pp-form-in-pf INSTANCE
Function: (setf pp-form-in-pf) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: pp-local-name INSTANCE
Function: (setf pp-local-name) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: pp-supplied-p-name INSTANCE
Function: (setf pp-supplied-p-name) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: pp-type-parameters INSTANCE
Function: (setf pp-type-parameters) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: pp-value-effective-type INSTANCE
Function: (setf pp-value-effective-type) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: pp-value-type INSTANCE
Function: (setf pp-value-type) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: recursive-function-p NAME BODY
Package

polymorphic-functions

Source

dispatch.lisp (file)

Function: register-polymorph NAME INLINE-P TYPED-LAMBDA-LIST TYPE-LIST EFFECTIVE-TYPE-LIST 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 (file)

Function: register-polymorph-compiler-macro NAME TYPE-LIST LAMBDA &optional SOURCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: register-polymorphic-function NAME UNTYPED-LAMBDA-LIST DOCUMENTATION DEFAULT &key OVERWRITE SOURCE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: remove-polymorph NAME TYPE-LIST
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: retrieve-polymorph-compiler-macro NAME &rest ARG-LIST
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: run-time-applicable-p-form POLYMORPH-PARAMETERS
Package

polymorphic-functions

Source

parameters.lisp (file)

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 (file)

Function: setf-function-name-p OBJECT
Package

polymorphic-functions

Source

package.lisp (file)

Function: simple-deparameterize-type TYPE-SPECIFIER &optional ENV
Package

polymorphic-functions

Source

deparameterize-type.lisp (file)

Function: subtypep-using-subtypep-alist TYPE1 TYPE2 &optional ENVIRONMENT
Package

polymorphic-functions

Source

core.lisp (file)

Function: translate-body BODY TRANSLATION-ALIST
Package

polymorphic-functions

Source

core.lisp (file)

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 (file)

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 (file)

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 (file)

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 (file)

Function: type-list-order-keywords TYPE-LIST
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: type-list-p LIST
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: type-parameter-compile-time-deparameterizer-lambda INSTANCE
Function: (setf type-parameter-compile-time-deparameterizer-lambda) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: type-parameter-compile-time-deparameterizer-lambda-body INSTANCE
Function: (setf type-parameter-compile-time-deparameterizer-lambda-body) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: type-parameter-name INSTANCE
Function: (setf type-parameter-name) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: type-parameter-p OBJECT
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: type-parameter-run-time-deparameterizer-lambda-body INSTANCE
Function: (setf type-parameter-run-time-deparameterizer-lambda-body) VALUE INSTANCE
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: type-parameters-from-parametric-type PARAMETRIC-TYPE-SPEC

Returns a list oF TYPE-PARAMETERS

Package

polymorphic-functions

Source

parametric-types.lisp (file)

Function: typed-lambda-list-p LAMBDA-LIST
Package

polymorphic-functions

Source

base.lisp (file)

Function: typexpand TYPE-SPECIFIER &optional ENV
Package

polymorphic-functions

Source

package.lisp (file)

Function: untyped-lambda-list NORMALIZED-TYPED-LAMBDA-LIST
Package

polymorphic-functions

Source

parameters.lisp (file)

Function: untyped-lambda-list-p LAMBDA-LIST
Package

polymorphic-functions

Source

base.lisp (file)

Function: update-polymorphic-function-lambda POLYMORPHIC-FUNCTION &optional INVALIDATE
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Function: valid-parameter-name-p NAME
Package

polymorphic-functions

Source

base.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

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 (file)

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

rest.lisp (file)

Method: %lambda-list-type (TYPE (eql required-key)) (LAMBDA-LIST list)
Source

required-key.lisp (file)

Method: %lambda-list-type (TYPE (eql required-optional)) (LAMBDA-LIST list)
Source

required-optional.lisp (file)

Method: %lambda-list-type (TYPE (eql required)) (LAMBDA-LIST list)
Source

required.lisp (file)

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 (file)

Methods
Method: %sbcl-transform-arg-lvars-from-lambda-list-form (TYPE (eql rest)) (UNTYPED-LAMBDA-LIST list)
Source

rest.lisp (file)

Method: %sbcl-transform-arg-lvars-from-lambda-list-form (TYPE (eql required-key)) (UNTYPED-LAMBDA-LIST list)
Source

required-key.lisp (file)

Method: %sbcl-transform-arg-lvars-from-lambda-list-form (TYPE (eql required-optional)) (UNTYPED-LAMBDA-LIST list)
Source

required-optional.lisp (file)

Method: %sbcl-transform-arg-lvars-from-lambda-list-form (TYPE (eql required)) (UNTYPED-LAMBDA-LIST list)
Source

required.lisp (file)

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 (file)

Methods
Method: %type-list-compatible-p (TYPE (eql rest)) (TYPE-LIST list) (UNTYPED-LAMBDA-LIST list)
Source

rest.lisp (file)

Method: %type-list-compatible-p (TYPE (eql required-key)) (TYPE-LIST list) (UNTYPED-LAMBDA-LIST list)
Source

required-key.lisp (file)

Method: %type-list-compatible-p (TYPE (eql required-optional)) (TYPE-LIST list) (UNTYPED-LAMBDA-LIST list)
Source

required-optional.lisp (file)

Method: %type-list-compatible-p (TYPE (eql required)) (TYPE-LIST list) (UNTYPED-LAMBDA-LIST list)
Source

required.lisp (file)

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 (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

required-key.lisp (file)

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

required-optional.lisp (file)

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

required.lisp (file)

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 (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

rest.lisp (file)

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

required-key.lisp (file)

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

required-optional.lisp (file)

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

required.lisp (file)

Generic Function: arg-types CONDITION
Package

polymorphic-functions

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

conditions.lisp (file)

Generic Function: args CONDITION
Package

polymorphic-functions

Methods
Method: args (CONDITION no-applicable-polymorph)
Source

conditions.lisp (file)

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 (file)

Methods
Method: compute-polymorphic-function-lambda-body (TYPE (eql rest)) (UNTYPED-LAMBDA-LIST list) &optional INVALIDATED-P
Source

rest.lisp (file)

Method: compute-polymorphic-function-lambda-body (TYPE (eql required-key)) (UNTYPED-LAMBDA-LIST list) &optional INVALIDATED-P
Source

required-key.lisp (file)

Method: compute-polymorphic-function-lambda-body (TYPE (eql required-optional)) (EFFECTIVE-LAMBDA-LIST list) &optional INVALIDATED-P
Source

required-optional.lisp (file)

Method: compute-polymorphic-function-lambda-body (TYPE (eql required)) (UNTYPED-LAMBDA-LIST list) &optional INVALIDATED-P
Source

required.lisp (file)

Generic Function: condition-datum CONDITION
Package

polymorphic-functions

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

conditions.lisp (file)

Generic Function: csubtypep-type OBJECT
Package

polymorphic-functions.extended-types

Methods
Method: csubtypep-type (CSUBTYPEP csubtypep)

automatically generated reader method

Source

subtypep.lisp (file)

Generic Function: csupertypep-type OBJECT
Package

polymorphic-functions.extended-types

Methods
Method: csupertypep-type (CSUPERTYPEP csupertypep)

automatically generated reader method

Source

supertypep.lisp (file)

Generic Function: ctype=-type OBJECT
Package

polymorphic-functions.extended-types

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

automatically generated reader method

Source

type=.lisp (file)

Generic Function: effective-type-lists CONDITION
Package

polymorphic-functions

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

conditions.lisp (file)

Generic Function: form CONDITION
Package

polymorphic-functions

Methods
Method: form (CONDITION form-type-failure)
Source

conditions.lisp (file)

Generic Function: name CONDITION
Package

polymorphic-functions

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

conditions.lisp (file)

Method: name (CONDITION no-applicable-polymorph)
Source

conditions.lisp (file)

Method: name (CONDITION not-a-ahp)
Source

conditions.lisp (file)

Method: name (CONDITION lambda-list-has-changed)
Source

conditions.lisp (file)

Generic Function: new-lambda-list CONDITION
Package

polymorphic-functions

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

conditions.lisp (file)

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 (file)

Generic Function: polymorphic-function-default OBJECT
Package

polymorphic-functions

Methods
Method: polymorphic-function-default (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated reader method

Source

polymorphic-function.lisp (file)

Generic Function: polymorphic-function-effective-lambda-list OBJECT
Package

polymorphic-functions

Methods
Method: polymorphic-function-effective-lambda-list (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated reader method

Source

polymorphic-function.lisp (file)

Generic Function: polymorphic-function-invalidated-p OBJECT
Generic Function: (setf polymorphic-function-invalidated-p) NEW-VALUE OBJECT
Package

polymorphic-functions

Methods
Method: polymorphic-function-invalidated-p (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated reader method

Source

polymorphic-function.lisp (file)

Method: (setf polymorphic-function-invalidated-p) NEW-VALUE (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated writer method

Source

polymorphic-function.lisp (file)

Generic Function: polymorphic-function-lambda-list OBJECT
Package

polymorphic-functions

Methods
Method: polymorphic-function-lambda-list (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated reader method

Source

polymorphic-function.lisp (file)

Generic Function: polymorphic-function-lambda-list-type OBJECT
Package

polymorphic-functions

Methods
Method: polymorphic-function-lambda-list-type (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated reader method

Source

polymorphic-function.lisp (file)

Generic Function: polymorphic-function-name OBJECT
Package

polymorphic-functions

Methods
Method: polymorphic-function-name (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated reader method

Source

polymorphic-function.lisp (file)

Generic Function: polymorphic-function-polymorphs OBJECT
Generic Function: (setf polymorphic-function-polymorphs) NEW-VALUE OBJECT
Package

polymorphic-functions

Methods
Method: polymorphic-function-polymorphs (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated reader method

Source

polymorphic-function.lisp (file)

Method: (setf polymorphic-function-polymorphs) NEW-VALUE (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated writer method

Source

polymorphic-function.lisp (file)

Generic Function: polymorphic-function-source OBJECT
Package

polymorphic-functions

Methods
Method: polymorphic-function-source (POLYMORPHIC-FUNCTION polymorphic-function)

automatically generated reader method

Source

polymorphic-function.lisp (file)

Generic Function: type-list CONDITION
Package

polymorphic-functions

Methods
Method: type-list (CONDITION polymorph-has-no-inline-lambda-body)
Source

conditions.lisp (file)

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 (file)

Methods
Method: upgraded-extended-type (TYPE-CAR (eql subtypep))
Source

subtypep.lisp (file)

Method: upgraded-extended-type (TYPE-CAR (eql type=))
Source

type=.lisp (file)

Method: upgraded-extended-type (TYPE-CAR (eql supertypep))
Source

supertypep.lisp (file)

Method: upgraded-extended-type (TYPE-CAR (eql type-like))

Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.7 Conditions

Condition: defpolymorph-note ()
Package

polymorphic-functions

Source

conditions.lisp (file)

Direct superclasses

note (condition)

Direct methods

condition-datum (method)

Direct slots
Slot: datum
Initargs

:datum

Readers

condition-datum (generic function)

Condition: form-type-failure ()
Package

polymorphic-functions

Source

conditions.lisp (file)

Direct superclasses

optimization-failure-note (condition)

Direct methods

form (method)

Direct slots
Slot: form
Initargs

:form

Initform

(quote (error "form not specified"))

Readers

form (generic function)

Condition: lambda-list-has-changed ()
Package

polymorphic-functions

Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods
Direct slots
Slot: name
Initargs

:name

Initform

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

Readers

name (generic function)

Slot: new-lambda-list
Initargs

:new-lambda-list

Initform

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

Readers

new-lambda-list (generic function)

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

polymorphic-functions

Source

conditions.lisp (file)

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

polymorphic-functions

Source

conditions.lisp (file)

Direct superclasses
Condition: not-a-ahp ()
Package

polymorphic-functions

Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct methods

name (method)

Direct slots
Slot: name
Initargs

:name

Initform

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

Readers

name (generic function)

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

polymorphic-functions

Source

conditions.lisp (file)

Direct superclasses

optimization-failure-note (condition)

Direct methods
Direct slots
Slot: name
Initargs

:name

Initform

(quote (error "name not specified"))

Readers

name (generic function)

Slot: type-list
Initargs

:type-list

Initform

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

Readers

type-list (generic function)

Condition: return-type-count-mismatch ()
Package

polymorphic-functions

Source

ensure-type-form.lisp (file)

Direct superclasses

condition (condition)

Direct subclasses

return-type-count-mismatch/warning (condition)

Direct slots
Slot: min
Initargs

:min

Slot: max
Initargs

:max

Slot: actual
Initargs

:actual

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

polymorphic-functions

Source

ensure-type-form.lisp (file)

Direct superclasses
Condition: return-type-mismatch ()
Package

polymorphic-functions

Source

ensure-type-form.lisp (file)

Direct superclasses

condition (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 (file)

Direct superclasses
Direct slots
Slot: expected
Initargs

:expected

Condition: return-type-mismatch/warning ()
Package

polymorphic-functions

Source

ensure-type-form.lisp (file)

Direct superclasses
Direct slots
Slot: declared
Initargs

:declared

Condition: subtypep-not-known ()
Package

polymorphic-functions

Source

core.lisp (file)

Direct superclasses

condition (condition)

Direct slots
Slot: type1
Initargs

:type1

Slot: type2
Initargs

:type2


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.8 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 (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: local-name
Readers

pp-local-name (function)

Writers

(setf pp-local-name) (function)

Slot: form-in-pf
Readers

pp-form-in-pf (function)

Writers

(setf pp-form-in-pf) (function)

Slot: value-type
Readers

pp-value-type (function)

Writers

(setf pp-value-type) (function)

Slot: default-value-form
Readers

pp-default-value-form (function)

Writers

(setf pp-default-value-form) (function)

Slot: supplied-p-name
Readers

pp-supplied-p-name (function)

Writers

(setf pp-supplied-p-name) (function)

Slot: type-parameters
Readers

pp-type-parameters (function)

Writers

(setf pp-type-parameters) (function)

Slot: value-effective-type
Readers

pp-value-effective-type (function)

Writers

(setf pp-value-effective-type) (function)

Structure: polymorph-parameters ()
Package

polymorphic-functions

Source

parameters.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: required
Readers

polymorph-parameters-required (function)

Writers

(setf polymorph-parameters-required) (function)

Slot: optional
Readers

polymorph-parameters-optional (function)

Writers

(setf polymorph-parameters-optional) (function)

Slot: rest
Readers

polymorph-parameters-rest (function)

Writers

(setf polymorph-parameters-rest) (function)

Slot: keyword
Readers

polymorph-parameters-keyword (function)

Writers

(setf polymorph-parameters-keyword) (function)

Slot: min-args
Readers

polymorph-parameters-min-args (function)

Writers

(setf polymorph-parameters-min-args) (function)

Slot: max-args
Readers

polymorph-parameters-max-args (function)

Writers

(setf polymorph-parameters-max-args) (function)

Slot: validator-form
Readers

polymorph-parameters-validator-form (function)

Writers

(setf polymorph-parameters-validator-form) (function)

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 (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: name
Readers

type-parameter-name (function)

Writers

(setf type-parameter-name) (function)

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

type-parameter-run-time-deparameterizer-lambda-body (function)

Writers

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

Slot: compile-time-deparameterizer-lambda
Readers

type-parameter-compile-time-deparameterizer-lambda (function)

Writers

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

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

type-parameter-compile-time-deparameterizer-lambda-body (function)

Writers

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


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.9 Classes

Class: csubtypep ()
Package

polymorphic-functions.extended-types

Source

subtypep.lisp (file)

Direct superclasses

ctype (class)

Direct methods
  • subctypep (method)
  • subctypep (method)
  • subctypep (method)
  • subctypep (method)
  • ctype= (method)
  • ctypep (method)
  • unparse (method)
  • csubtypep-type (method)
Direct slots
Slot: %type
Type

ctype:ctype

Initargs

:type

Readers

csubtypep-type (generic function)

Class: csupertypep ()
Package

polymorphic-functions.extended-types

Source

supertypep.lisp (file)

Direct superclasses

ctype (class)

Direct methods
  • subctypep (method)
  • subctypep (method)
  • subctypep (method)
  • subctypep (method)
  • conjoin/2 (method)
  • subctypep (method)
  • ctype= (method)
  • ctypep (method)
  • unparse (method)
  • csupertypep-type (method)
Direct slots
Slot: %type
Type

ctype:ctype

Initargs

:type

Readers

csupertypep-type (generic function)

Class: ctype= ()
Package

polymorphic-functions.extended-types

Source

type=.lisp (file)

Direct superclasses

ctype (class)

Direct methods
  • subctypep (method)
  • subctypep (method)
  • subctypep (method)
  • subctypep (method)
  • conjoin/2 (method)
  • subctypep (method)
  • ctype= (method)
  • ctypep (method)
  • unparse (method)
  • ctype=-type (method)
Direct slots
Slot: %type
Type

ctype:ctype

Initargs

:type

Readers

ctype=-type (generic function)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.10 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 (file)

Type: function-name ()

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

Package

polymorphic-functions

Source

package.lisp (file)

Type: lambda-list-type ()
Package

polymorphic-functions

Source

base.lisp (file)

Type: parametric-type-specifier ()
Package

polymorphic-functions

Source

parametric-types.lisp (file)

Type: type-list ()
Package

polymorphic-functions

Source

polymorphic-function.lisp (file)

Type: typed-lambda-list ()

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

Package

polymorphic-functions

Source

base.lisp (file)

Type: untyped-lambda-list ()

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

Package

polymorphic-functions

Source

base.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   M   P  
Index Entry  Section

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

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

M
Module, polymorphic-functions/extended-types: The polymorphic-functions/extended-types module
Module, polymorphic-functions/lambda-lists: The polymorphic-functions/lambda-lists module

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

Jump to:   F   L   M   P  

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: Exported generic functions
%deparameterize-type: Exported generic functions
%deparameterize-type: Exported generic functions
%deparameterize-type: Exported generic functions
%deparameterize-type: Exported generic functions
%deparameterize-type: Exported generic functions
%deparameterize-type: Exported generic functions
%deparameterize-type: Exported generic functions
%lambda-list-type: Internal generic functions
%lambda-list-type: Internal generic functions
%lambda-list-type: Internal generic functions
%lambda-list-type: Internal generic functions
%lambda-list-type: Internal generic functions
%lambda-list-type: Internal generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Internal generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Internal generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Internal generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Internal generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Internal generic functions
%sbcl-transform-arg-lvars-from-lambda-list-form: Internal generic functions
%type-list-compatible-p: Internal generic functions
%type-list-compatible-p: Internal generic functions
%type-list-compatible-p: Internal generic functions
%type-list-compatible-p: Internal generic functions
%type-list-compatible-p: Internal generic functions
%type-list-compatible-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-intersection-null-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions
%type-list-more-specific-p: Internal generic functions

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

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

B
blockify-name: Internal functions

C
catch-condition: Internal macros
cl-type-specifier-p: Exported functions
Compiler Macro, subtypep: Exported compiler macros
Compiler Macro, supertypep: Exported compiler macros
Compiler Macro, typep: Exported compiler macros
compiler-applicable-p-lambda-body: Internal functions
compiler-retrieve-polymorph: Internal functions
compute-polymorphic-function-lambda-body: Internal generic functions
compute-polymorphic-function-lambda-body: Internal generic functions
compute-polymorphic-function-lambda-body: Internal generic functions
compute-polymorphic-function-lambda-body: Internal generic functions
compute-polymorphic-function-lambda-body: Internal generic functions
condition-datum: Internal generic functions
condition-datum: Internal generic functions
copy-polymorph: Internal functions
copy-polymorph-parameter: Internal functions
copy-polymorph-parameters: Internal functions
copy-type-parameter: Internal functions
csubtypep: Internal functions
csubtypep-type: Internal generic functions
csubtypep-type: Internal generic functions
csupertypep: Internal functions
csupertypep-type: Internal generic functions
csupertypep-type: Internal generic functions
ctype=: Internal functions
ctype=-type: Internal generic functions
ctype=-type: Internal generic functions

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

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

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

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

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

L
lambda-declarations: Internal functions
lambda-list-type: Internal functions
lambda-list-type-p: Internal functions
list-named-lambda: Internal macros

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

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

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

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

S
sbcl-transform-arg-lvars-from-lambda-list-form: Internal functions
setf-function-name-p: Internal functions
simple-deparameterize-type: Internal functions
subtypep: Exported compiler macros
subtypep: Exported functions
subtypep-using-subtypep-alist: Internal functions
supertypep: Exported compiler macros
supertypep: Exported functions

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

U
undefine-polymorphic-function: Exported functions
undefpolymorph: Exported functions
untyped-lambda-list: Internal functions
untyped-lambda-list-p: Internal functions
update-polymorphic-function-lambda: Internal functions
upgrade-extended-type: Exported functions
upgraded-extended-type: Internal generic functions
upgraded-extended-type: Internal generic functions
upgraded-extended-type: Internal generic functions
upgraded-extended-type: Internal generic functions
upgraded-extended-type: Internal generic functions

V
valid-parameter-name-p: Internal functions

W
with-muffled-compilation-warnings: Internal 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: Exported classes
%type: Internal classes
%type: Internal classes
%type: Internal classes

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

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

A
actual: Internal conditions
actual: Internal conditions
arg-types: Exported conditions
args: Exported conditions

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

D
datum: Internal conditions
declared: Internal conditions
default: Exported classes
default-value-form: Internal structures
documentation: Exported structures
documentation: Exported classes

E
effective-lambda-list: Exported classes
effective-type-list: Exported structures
effective-type-lists: Exported conditions
expected: Internal conditions

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

I
index: Internal conditions
inline-lambda-body: Exported structures
inline-p: Exported structures
invalidated-p: Exported classes

K
keyword: Internal structures

L
lambda-list: Exported classes
lambda-list-type: Exported structures
lambda-list-type: Exported classes
local-name: Internal structures

M
max: Internal conditions
max-args: Internal structures
min: Internal conditions
min-args: Internal structures

N
name: Exported conditions
name: Exported structures
name: Exported classes
name: Internal conditions
name: Internal conditions
name: Internal conditions
name: Internal structures
new-lambda-list: Internal conditions

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

P
parameters: Exported structures
polymorphs: Exported classes

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

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

T
type-list: Exported structures
type-list: Internal conditions
type-parameters: Internal structures
type1: Internal conditions
type2: Internal conditions

V
validator-form: Internal structures
value-effective-type: Internal structures
value-type: Internal 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:   C   D   E   F   L   N   P   R   S   T   U  
Index Entry  Section

C
Class, csubtypep: Internal classes
Class, csupertypep: Internal classes
Class, ctype=: Internal classes
Class, polymorphic-function: Exported classes
Condition, defpolymorph-note: Internal conditions
Condition, form-type-failure: Internal conditions
Condition, lambda-list-has-changed: Internal conditions
Condition, no-applicable-polymorph: Exported conditions
Condition, no-applicable-polymorph/compiler-note: Internal conditions
Condition, no-applicable-polymorph/error: Internal conditions
Condition, not-a-ahp: Internal conditions
Condition, polymorph-has-no-inline-lambda-body: Internal conditions
Condition, return-type-count-mismatch: Internal conditions
Condition, return-type-count-mismatch/warning: Internal conditions
Condition, return-type-mismatch: Internal conditions
Condition, return-type-mismatch/error: Internal conditions
Condition, return-type-mismatch/warning: Internal conditions
Condition, subtypep-not-known: Internal conditions
csubtypep: Internal classes
csupertypep: Internal classes
ctype=: Internal classes

D
defpolymorph-note: Internal conditions

E
extended-type-specifier: Internal types

F
form-type-failure: Internal conditions
function-name: Internal types

L
lambda-list-has-changed: Internal conditions
lambda-list-type: Internal types

N
no-applicable-polymorph: Exported conditions
no-applicable-polymorph/compiler-note: Internal conditions
no-applicable-polymorph/error: Internal conditions
not-a-ahp: Internal 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
parametric-type-specifier: Internal types
polymorph: Exported structures
polymorph-has-no-inline-lambda-body: Internal conditions
polymorph-parameter: Internal structures
polymorph-parameters: Internal structures
polymorphic-function: Exported classes
polymorphic-functions: The polymorphic-functions system
polymorphic-functions: The polymorphic-functions package
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

R
return-type-count-mismatch: Internal conditions
return-type-count-mismatch/warning: Internal conditions
return-type-mismatch: Internal conditions
return-type-mismatch/error: Internal conditions
return-type-mismatch/warning: Internal conditions

S
Structure, polymorph: Exported structures
Structure, polymorph-parameter: Internal structures
Structure, polymorph-parameters: Internal structures
Structure, type-parameter: Internal structures
subtypep-not-known: Internal conditions
System, polymorphic-functions: The polymorphic-functions system

T
Type, extended-type-specifier: Internal types
Type, function-name: Internal types
Type, lambda-list-type: Internal types
Type, parametric-type-specifier: Internal types
Type, type-list: Internal types
Type, typed-lambda-list: Internal types
Type, untyped-lambda-list: Internal types
type-list: Internal types
type-parameter: Internal structures
typed-lambda-list: Internal types

U
untyped-lambda-list: Internal types

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