# 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 3.0 "Montgomery Scott" on Sun May 15 06:10:59 2022 GMT+0.

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

# 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))

``````

MIT

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 strict-function

Author

cxxxr

MIT

Description

Utility of function definition

Dependencies
• alexandria
• trivia
Source

strict-function.asd (file)

Component

strict-function.lisp (file)

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

## 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

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

#### 3.1.1 strict-function.asd

Location

strict-function.asd

Systems

strict-function (system)

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

#### 3.1.2 strict-function/strict-function.lisp

Parent

strict-function (system)

Location

strict-function.lisp

Packages
Exported Definitions
Internal Definitions

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

## 4 Packages

Packages are listed by definition order.

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

### 4.1 strict-function

Source

strict-function.lisp (file)

Use List
• alexandria
• common-lisp
Exported Definitions
Internal Definitions

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

## 5 Definitions

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

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

### 5.1 Exported definitions

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

#### 5.1.1 Macros

Macro: define-strict-function FUNCTION-NAME (&key INPUTS OUTPUTS CONDITIONS USE-SUPPLIED-VARS) &body BODY
Package
Source

strict-function.lisp (file)

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

#### 5.1.2 Functions

Function: clear-unexpected-conditions ()
Package
Source

strict-function.lisp (file)

Function: collect-unexpected-conditions &optional FUNCTION-NAME
Package
Source

strict-function.lisp (file)

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

#### 5.1.3 Generic functions

Generic Function: strict-unexpected-condition-error-actual-condition CONDITION
Package
Methods
Method: strict-unexpected-condition-error-actual-condition (CONDITION strict-unexpected-condition-error)
Source

strict-function.lisp (file)

Generic Function: strict-unexpected-condition-error-expected-conditions CONDITION
Package
Methods
Method: strict-unexpected-condition-error-expected-conditions (CONDITION strict-unexpected-condition-error)
Source

strict-function.lisp (file)

Generic Function: strict-unexpected-condition-error-expected-function-name CONDITION
Package
Methods
Method: strict-unexpected-condition-error-expected-function-name (CONDITION strict-unexpected-condition-error)
Source

strict-function.lisp (file)

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

#### 5.1.4 Conditions

Condition: strict-function-error ()
Package
Source

strict-function.lisp (file)

Direct superclasses

simple-error (condition)

Direct subclasses
Condition: strict-invalid-input ()
Package
Source

strict-function.lisp (file)

Direct superclasses

strict-type-error (condition)

Direct methods

strict-invalid-input-var (method)

Direct slots
Slot: var
Initargs

:var

strict-invalid-input-var (generic function)

Condition: strict-invalid-multivalued-number ()
Package
Source

strict-function.lisp (file)

Direct superclasses

strict-function-error (condition)

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

:expected-nth-values

strict-invalid-multivalued-number-expected-nth-values (generic function)

Slot: actual-values
Initargs

:actual-values

strict-invalid-multivalued-number-actual-values (generic function)

Condition: strict-invalid-output ()
Package
Source

strict-function.lisp (file)

Direct superclasses

strict-type-error (condition)

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

### 5.2 Internal definitions

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

#### 5.2.1 Special variables

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

strict-function.lisp (file)

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

#### 5.2.2 Macros

Macro: validate-multiple-outputs BODY TYPES
Package
Source

strict-function.lisp (file)

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

#### 5.2.3 Functions

Function: concreate-check-types PARAM-TYPE-PAIRS SUPPLIED-PAIRS
Package
Source

strict-function.lisp (file)

Function: construct-body FUNCTION-NAME PARAM-TYPE-PAIRS BODY-DECLS BODY OUTPUTS OUTPUTS-SPECIFIED-P CONDITIONS
Package
Source

strict-function.lisp (file)

Function: construct-check-conditions-form CONDITIONS BODY FUNCTION-NAME
Package
Source

strict-function.lisp (file)

Function: construct-check-outputs BODY OUTPUTS OUTPUTS-SPECIFIED-P
Package
Source

strict-function.lisp (file)

Function: construct-rebind-parameters PARAM-TYPE-PAIRS BODY-DECLS BODY
Package
Source

strict-function.lisp (file)

Function: lambda-list-keyword-p X
Package
Source

strict-function.lisp (file)

Function: make-nth-functions N
Package
Source

strict-function.lisp (file)

Function: mapping-lambda-list-parameters-to-types LAMBDA-LIST PARAM-TYPES
Package
Source

strict-function.lisp (file)

Function: parse-inputs INPUTS
Package
Source

strict-function.lisp (file)

Function: parse-param PARAM
Package
Source

strict-function.lisp (file)

Function: reform-lambda-list LAMBDA-LIST USE-SUPPLIED-VARS
Package
Source

strict-function.lisp (file)

Function: validate-conditions ACTUAL-CONDITION EXPECTED-CONDITIONS FUNCTION-NAME
Package
Source

strict-function.lisp (file)

Function: validate-input VAR VALUE TYPE
Package
Source

strict-function.lisp (file)

Function: validate-number-of-outputs VALUES N
Package
Source

strict-function.lisp (file)

Function: validate-outputs RESULT OUTPUTS
Package
Source

strict-function.lisp (file)

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

#### 5.2.4 Generic functions

Generic Function: strict-invalid-input-var CONDITION
Package
Methods
Method: strict-invalid-input-var (CONDITION strict-invalid-input)
Source

strict-function.lisp (file)

Generic Function: strict-invalid-multivalued-number-actual-values CONDITION
Package
Methods
Method: strict-invalid-multivalued-number-actual-values (CONDITION strict-invalid-multivalued-number)
Source

strict-function.lisp (file)

Generic Function: strict-invalid-multivalued-number-expected-nth-values CONDITION
Package
Methods
Method: strict-invalid-multivalued-number-expected-nth-values (CONDITION strict-invalid-multivalued-number)
Source

strict-function.lisp (file)

Generic Function: strict-type-error-expected-type CONDITION
Package
Methods
Method: strict-type-error-expected-type (CONDITION strict-type-error)
Source

strict-function.lisp (file)

Generic Function: strict-type-error-value CONDITION
Package
Methods
Method: strict-type-error-value (CONDITION strict-type-error)
Source

strict-function.lisp (file)

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

#### 5.2.5 Conditions

Condition: strict-type-error ()
Package
Source

strict-function.lisp (file)

Direct superclasses

strict-function-error (condition)

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

:expected-type

strict-type-error-expected-type (generic function)

Slot: value
Initargs

:value

strict-type-error-value (generic function)

Condition: strict-unexpected-condition-error ()
Package
Source

strict-function.lisp (file)

Direct superclasses

strict-function-error (condition)

Direct methods
Direct slots
Slot: function-name
Initargs

:function-name

strict-unexpected-condition-error-expected-function-name (generic function)

Slot: expected-conditions
Initargs

:expected-conditions

strict-unexpected-condition-error-expected-conditions (generic function)

Slot: actual-condition
Initargs

:actual-condition

strict-unexpected-condition-error-actual-condition (generic function)

Slot: backtrace
Initargs

:backtrace

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

## 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
Jump to: C   D   F   G   L   M   P   R   S   V

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