The strict-function Reference Manual

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

The strict-function Reference Manual

This is the strict-function Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Sep 15 06:14:00 2022 GMT+0.

Table of Contents


1 Introduction

strict-function

Utility of function definition

The original implementation can be found at http://common-lisp.net/project/qitab/archives/quux-2013-09-24.tar.bz2 (quux/lisp/quux/strict-functions.lisp)

Example

(define-strict-function func-ordinary-1 (:inputs ((a fixnum) (b fixnum)))
  (+ a b))

(define-strict-function func-rest-1 (:inputs ((a fixnum "a is fixnum")
                                              (b fixnum "b is fixnum")
                                              &rest (numbers list
                                                             "proper-list of fixnum")))
  (+ a b (apply #'+ numbers)))

(define-strict-function func-outputs-1 (:inputs ((arg integer))
                                        :outputs (integer 0 *))
  arg)

(define-strict-function func-outputs-2 (:inputs ((values list))
                                        :outputs (values (integer 0 *)
                                                         boolean))
  (apply #'values values))

(define-strict-function func-optional-1 (:inputs (&optional (a integer)))
  a)

(define-strict-function func-optional-2 (:inputs (&optional ((a 100) integer)))
  a)

(define-strict-function func-optional-3 (:inputs (&optional ((a "test") integer)))
  a)

(define-strict-function func-optional-4 (:inputs (&optional ((a #\a) character))
                                         :use-supplied-vars t)
  (list a a-supplied-p))

(define-strict-function func-optional-5 (:inputs (&optional ((a 1 a-p) integer)))
  (list a a-p))

(define-strict-function func-key-1 (:inputs (&key (a string)))
  a)

(define-strict-function func-key-2 (:inputs (&key ((a "default") string)))
  a)

(define-strict-function func-key-3 (:inputs (&key ((a 1 a-p) integer)))
  (list a a-p))

(define-strict-function func-key-4 (:inputs (&key ((a "default") integer)))
  a)

(define-strict-function func-key-5 (:inputs (&key (x integer) (y integer))
                                    :use-supplied-vars t)
  (list x x-supplied-p
        y y-supplied-p))

(define-strict-function func-key-6 (:inputs (&key (x integer) &allow-other-keys))
  x)

(define-strict-function func-aux-1 (:inputs (&aux (x string)))
  x)

(define-strict-function func-aux-2 (:inputs (&aux ((x "foo") string)))
  x)

(define-strict-function func-aux-3 (:inputs (&aux ((x "foo") string)
                                                  ((y 12) number)))
  (list x y))

LICENSE

MIT


2 Systems

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


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

2.1 strict-function

Utility of function definition

Author

cxxxr

License

MIT

Dependencies
  • alexandria (system).
  • trivia (system).
Source

strict-function.asd.

Child Component

strict-function.lisp (file).


3 Files

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


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

3.1 Lisp


3.1.1 strict-function/strict-function.asd

Source

strict-function.asd.

Parent Component

strict-function (system).

ASDF Systems

strict-function.


3.1.2 strict-function/strict-function.lisp

Source

strict-function.asd.

Parent Component

strict-function (system).

Packages

strict-function.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


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

4.1 strict-function

Source

strict-function.lisp.

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

5 Definitions

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


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

5.1 Public Interface


5.1.1 Macros

Macro: define-strict-function (function-name (&key inputs outputs conditions use-supplied-vars) &body body)
Package

strict-function.

Source

strict-function.lisp.


5.1.2 Ordinary functions

Function: clear-unexpected-conditions ()
Package

strict-function.

Source

strict-function.lisp.

Function: collect-unexpected-conditions (&optional function-name)
Package

strict-function.

Source

strict-function.lisp.


5.1.3 Generic functions

Generic Reader: strict-unexpected-condition-error-actual-condition (condition)
Package

strict-function.

Methods
Reader Method: strict-unexpected-condition-error-actual-condition ((condition strict-unexpected-condition-error))
Source

strict-function.lisp.

Target Slot

actual-condition.

Generic Reader: strict-unexpected-condition-error-expected-conditions (condition)
Package

strict-function.

Methods
Reader Method: strict-unexpected-condition-error-expected-conditions ((condition strict-unexpected-condition-error))
Source

strict-function.lisp.

Target Slot

expected-conditions.

Generic Reader: strict-unexpected-condition-error-expected-function-name (condition)
Package

strict-function.

Methods
Reader Method: strict-unexpected-condition-error-expected-function-name ((condition strict-unexpected-condition-error))
Source

strict-function.lisp.

Target Slot

function-name.


5.1.4 Conditions

Condition: strict-function-error
Package

strict-function.

Source

strict-function.lisp.

Direct superclasses

simple-error.

Direct subclasses
Condition: strict-invalid-input
Package

strict-function.

Source

strict-function.lisp.

Direct superclasses

strict-type-error.

Direct methods

strict-invalid-input-var.

Direct slots
Slot: var
Initargs

:var

Readers

strict-invalid-input-var.

Writers

This slot is read-only.

Condition: strict-invalid-multivalued-number
Package

strict-function.

Source

strict-function.lisp.

Direct superclasses

strict-function-error.

Direct methods
Direct slots
Slot: expected-nth-values
Initargs

:expected-nth-values

Readers

strict-invalid-multivalued-number-expected-nth-values.

Writers

This slot is read-only.

Slot: actual-values
Initargs

:actual-values

Readers

strict-invalid-multivalued-number-actual-values.

Writers

This slot is read-only.

Condition: strict-invalid-output
Package

strict-function.

Source

strict-function.lisp.

Direct superclasses

strict-type-error.


5.2 Internals


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

5.2.1 Special variables

Special Variable: *unexpected-condition-error-occurred-functions*
Package

strict-function.

Source

strict-function.lisp.


5.2.2 Macros

Macro: validate-multiple-outputs (body types)
Package

strict-function.

Source

strict-function.lisp.


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

5.2.3 Ordinary functions

Function: concreate-check-types (param-type-pairs supplied-pairs)
Package

strict-function.

Source

strict-function.lisp.

Function: construct-body (function-name param-type-pairs body-decls body outputs outputs-specified-p conditions)
Package

strict-function.

Source

strict-function.lisp.

Function: construct-check-conditions-form (conditions body function-name)
Package

strict-function.

Source

strict-function.lisp.

Function: construct-check-outputs (body outputs outputs-specified-p)
Package

strict-function.

Source

strict-function.lisp.

Function: construct-rebind-parameters (param-type-pairs body-decls body)
Package

strict-function.

Source

strict-function.lisp.

Function: lambda-list-keyword-p (x)
Package

strict-function.

Source

strict-function.lisp.

Function: make-nth-functions (n)
Package

strict-function.

Source

strict-function.lisp.

Function: mapping-lambda-list-parameters-to-types (lambda-list param-types)
Package

strict-function.

Source

strict-function.lisp.

Function: parse-inputs (inputs)
Package

strict-function.

Source

strict-function.lisp.

Function: parse-param (param)
Package

strict-function.

Source

strict-function.lisp.

Function: reform-lambda-list (lambda-list use-supplied-vars)
Package

strict-function.

Source

strict-function.lisp.

Function: validate-conditions (actual-condition expected-conditions function-name)
Package

strict-function.

Source

strict-function.lisp.

Function: validate-input (var value type)
Package

strict-function.

Source

strict-function.lisp.

Function: validate-number-of-outputs (values n)
Package

strict-function.

Source

strict-function.lisp.

Function: validate-outputs (result outputs)
Package

strict-function.

Source

strict-function.lisp.


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

5.2.4 Generic functions

Generic Reader: strict-invalid-input-var (condition)
Package

strict-function.

Methods
Reader Method: strict-invalid-input-var ((condition strict-invalid-input))
Source

strict-function.lisp.

Target Slot

var.

Generic Reader: strict-invalid-multivalued-number-actual-values (condition)
Package

strict-function.

Methods
Reader Method: strict-invalid-multivalued-number-actual-values ((condition strict-invalid-multivalued-number))
Source

strict-function.lisp.

Target Slot

actual-values.

Generic Reader: strict-invalid-multivalued-number-expected-nth-values (condition)
Package

strict-function.

Methods
Reader Method: strict-invalid-multivalued-number-expected-nth-values ((condition strict-invalid-multivalued-number))
Source

strict-function.lisp.

Target Slot

expected-nth-values.

Generic Reader: strict-type-error-expected-type (condition)
Package

strict-function.

Methods
Reader Method: strict-type-error-expected-type ((condition strict-type-error))
Source

strict-function.lisp.

Target Slot

expected-type.

Generic Reader: strict-type-error-value (condition)
Package

strict-function.

Methods
Reader Method: strict-type-error-value ((condition strict-type-error))
Source

strict-function.lisp.

Target Slot

value.


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

5.2.5 Conditions

Condition: strict-type-error
Package

strict-function.

Source

strict-function.lisp.

Direct superclasses

strict-function-error.

Direct subclasses
Direct methods
Direct slots
Slot: expected-type
Initargs

:expected-type

Readers

strict-type-error-expected-type.

Writers

This slot is read-only.

Slot: value
Initargs

:value

Readers

strict-type-error-value.

Writers

This slot is read-only.

Condition: strict-unexpected-condition-error
Package

strict-function.

Source

strict-function.lisp.

Direct superclasses

strict-function-error.

Direct methods
Direct slots
Slot: function-name
Initargs

:function-name

Readers

strict-unexpected-condition-error-expected-function-name.

Writers

This slot is read-only.

Slot: expected-conditions
Initargs

:expected-conditions

Readers

strict-unexpected-condition-error-expected-conditions.

Writers

This slot is read-only.

Slot: actual-condition
Initargs

:actual-condition

Readers

strict-unexpected-condition-error-actual-condition.

Writers

This slot is read-only.

Slot: backtrace
Initargs

:backtrace


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   C   D   F   G   L   M   P   R   S   V  
Index Entry  Section

C
clear-unexpected-conditions: Public ordinary functions
collect-unexpected-conditions: Public ordinary functions
concreate-check-types: Private ordinary functions
construct-body: Private ordinary functions
construct-check-conditions-form: Private ordinary functions
construct-check-outputs: Private ordinary functions
construct-rebind-parameters: Private ordinary functions

D
define-strict-function: Public macros

F
Function, clear-unexpected-conditions: Public ordinary functions
Function, collect-unexpected-conditions: Public ordinary functions
Function, concreate-check-types: Private ordinary functions
Function, construct-body: Private ordinary functions
Function, construct-check-conditions-form: Private ordinary functions
Function, construct-check-outputs: Private ordinary functions
Function, construct-rebind-parameters: Private ordinary functions
Function, lambda-list-keyword-p: Private ordinary functions
Function, make-nth-functions: Private ordinary functions
Function, mapping-lambda-list-parameters-to-types: Private ordinary functions
Function, parse-inputs: Private ordinary functions
Function, parse-param: Private ordinary functions
Function, reform-lambda-list: Private ordinary functions
Function, validate-conditions: Private ordinary functions
Function, validate-input: Private ordinary functions
Function, validate-number-of-outputs: Private ordinary functions
Function, validate-outputs: Private ordinary functions

G
Generic Function, strict-invalid-input-var: Private generic functions
Generic Function, strict-invalid-multivalued-number-actual-values: Private generic functions
Generic Function, strict-invalid-multivalued-number-expected-nth-values: Private generic functions
Generic Function, strict-type-error-expected-type: Private generic functions
Generic Function, strict-type-error-value: Private generic functions
Generic Function, strict-unexpected-condition-error-actual-condition: Public generic functions
Generic Function, strict-unexpected-condition-error-expected-conditions: Public generic functions
Generic Function, strict-unexpected-condition-error-expected-function-name: Public generic functions

L
lambda-list-keyword-p: Private ordinary functions

M
Macro, define-strict-function: Public macros
Macro, validate-multiple-outputs: Private macros
make-nth-functions: Private ordinary functions
mapping-lambda-list-parameters-to-types: Private ordinary functions
Method, strict-invalid-input-var: Private generic functions
Method, strict-invalid-multivalued-number-actual-values: Private generic functions
Method, strict-invalid-multivalued-number-expected-nth-values: Private generic functions
Method, strict-type-error-expected-type: Private generic functions
Method, strict-type-error-value: Private generic functions
Method, strict-unexpected-condition-error-actual-condition: Public generic functions
Method, strict-unexpected-condition-error-expected-conditions: Public generic functions
Method, strict-unexpected-condition-error-expected-function-name: Public generic functions

P
parse-inputs: Private ordinary functions
parse-param: Private ordinary functions

R
reform-lambda-list: Private ordinary functions

S
strict-invalid-input-var: Private generic functions
strict-invalid-input-var: Private generic functions
strict-invalid-multivalued-number-actual-values: Private generic functions
strict-invalid-multivalued-number-actual-values: Private generic functions
strict-invalid-multivalued-number-expected-nth-values: Private generic functions
strict-invalid-multivalued-number-expected-nth-values: Private generic functions
strict-type-error-expected-type: Private generic functions
strict-type-error-expected-type: Private generic functions
strict-type-error-value: Private generic functions
strict-type-error-value: Private generic functions
strict-unexpected-condition-error-actual-condition: Public generic functions
strict-unexpected-condition-error-actual-condition: Public generic functions
strict-unexpected-condition-error-expected-conditions: Public generic functions
strict-unexpected-condition-error-expected-conditions: Public generic functions
strict-unexpected-condition-error-expected-function-name: Public generic functions
strict-unexpected-condition-error-expected-function-name: Public generic functions

V
validate-conditions: Private ordinary functions
validate-input: Private ordinary functions
validate-multiple-outputs: Private macros
validate-number-of-outputs: Private ordinary functions
validate-outputs: Private ordinary functions

Jump to:   C   D   F   G   L   M   P   R   S   V