The strict-function Reference Manual

Table of Contents

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]

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


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

License

MIT

Description

Utility of function definition

Dependencies
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

strict-function

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

strict-function

Source

strict-function.lisp (file)


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

5.1.2 Functions

Function: clear-unexpected-conditions ()
Package

strict-function

Source

strict-function.lisp (file)

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

strict-function

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

strict-function

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

strict-function

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

strict-function

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

strict-function

Source

strict-function.lisp (file)

Direct superclasses

simple-error (condition)

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

strict-function

Source

strict-function.lisp (file)

Direct superclasses

strict-type-error (condition)

Direct methods

strict-invalid-input-var (method)

Direct slots
Slot: var
Initargs

:var

Readers

strict-invalid-input-var (generic function)

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

strict-function

Source

strict-function.lisp (file)

Direct superclasses

strict-function-error (condition)

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

:expected-nth-values

Readers

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

Slot: actual-values
Initargs

:actual-values

Readers

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

Condition: strict-invalid-output ()
Package

strict-function

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

strict-function

Source

strict-function.lisp (file)


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

5.2.2 Macros

Macro: validate-multiple-outputs BODY TYPES
Package

strict-function

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

strict-function

Source

strict-function.lisp (file)

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

strict-function

Source

strict-function.lisp (file)

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

strict-function

Source

strict-function.lisp (file)

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

strict-function

Source

strict-function.lisp (file)

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

strict-function

Source

strict-function.lisp (file)

Function: lambda-list-keyword-p X
Package

strict-function

Source

strict-function.lisp (file)

Function: make-nth-functions N
Package

strict-function

Source

strict-function.lisp (file)

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

strict-function

Source

strict-function.lisp (file)

Function: parse-inputs INPUTS
Package

strict-function

Source

strict-function.lisp (file)

Function: parse-param PARAM
Package

strict-function

Source

strict-function.lisp (file)

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

strict-function

Source

strict-function.lisp (file)

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

strict-function

Source

strict-function.lisp (file)

Function: validate-input VAR VALUE TYPE
Package

strict-function

Source

strict-function.lisp (file)

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

strict-function

Source

strict-function.lisp (file)

Function: validate-outputs RESULT OUTPUTS
Package

strict-function

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

strict-function

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

strict-function

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

strict-function

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

strict-function

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

strict-function.lisp (file)

Generic Function: strict-type-error-value CONDITION
Package

strict-function

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

strict-function

Source

strict-function.lisp (file)

Direct superclasses

strict-function-error (condition)

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

:expected-type

Readers

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

Slot: value
Initargs

:value

Readers

strict-type-error-value (generic function)

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

strict-function

Source

strict-function.lisp (file)

Direct superclasses

strict-function-error (condition)

Direct methods
Direct slots
Slot: function-name
Initargs

:function-name

Readers

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

Slot: expected-conditions
Initargs

:expected-conditions

Readers

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

Slot: actual-condition
Initargs

:actual-condition

Readers

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

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, strict-function.asd: The strict-function․asd file
File, Lisp, strict-function/strict-function.lisp: The strict-function/strict-function․lisp file

L
Lisp File, strict-function.asd: The strict-function․asd file
Lisp File, strict-function/strict-function.lisp: The strict-function/strict-function․lisp file

S
strict-function.asd: The strict-function․asd file
strict-function/strict-function.lisp: The strict-function/strict-function․lisp file

Jump to:   F   L   S  

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: Exported functions
collect-unexpected-conditions: Exported functions
concreate-check-types: Internal functions
construct-body: Internal functions
construct-check-conditions-form: Internal functions
construct-check-outputs: Internal functions
construct-rebind-parameters: Internal functions

D
define-strict-function: Exported macros

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

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

L
lambda-list-keyword-p: Internal functions

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

P
parse-inputs: Internal functions
parse-param: Internal functions

R
reform-lambda-list: Internal functions

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

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

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

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

A.3 Variables

Jump to:   *  
A   B   E   F   S   V  
Index Entry  Section

*
*unexpected-condition-error-occurred-functions*: Internal special variables

A
actual-condition: Internal conditions
actual-values: Exported conditions

B
backtrace: Internal conditions

E
expected-conditions: Internal conditions
expected-nth-values: Exported conditions
expected-type: Internal conditions

F
function-name: Internal conditions

S
Slot, actual-condition: Internal conditions
Slot, actual-values: Exported conditions
Slot, backtrace: Internal conditions
Slot, expected-conditions: Internal conditions
Slot, expected-nth-values: Exported conditions
Slot, expected-type: Internal conditions
Slot, function-name: Internal conditions
Slot, value: Internal conditions
Slot, var: Exported conditions
Special Variable, *unexpected-condition-error-occurred-functions*: Internal special variables

V
value: Internal conditions
var: Exported conditions

Jump to:   *  
A   B   E   F   S   V  

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

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
Condition, strict-function-error: Exported conditions
Condition, strict-invalid-input: Exported conditions
Condition, strict-invalid-multivalued-number: Exported conditions
Condition, strict-invalid-output: Exported conditions
Condition, strict-type-error: Internal conditions
Condition, strict-unexpected-condition-error: Internal conditions

P
Package, strict-function: The strict-function package

S
strict-function: The strict-function system
strict-function: The strict-function package
strict-function-error: Exported conditions
strict-invalid-input: Exported conditions
strict-invalid-multivalued-number: Exported conditions
strict-invalid-output: Exported conditions
strict-type-error: Internal conditions
strict-unexpected-condition-error: Internal conditions
System, strict-function: The strict-function system

Jump to:   C   P   S