This is the trivial-types Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:58:36 2024 GMT+0.
trivial-types/trivial-types.asd
trivial-types/src/package.lisp
trivial-types/src/specials.lisp
trivial-types/src/lists.lisp
trivial-types/src/designators.lisp
trivial-types/src/streams.lisp
trivial-types/src/combinators.lisp
trivial-types/src/typespecs.lisp
The main system appears first, followed by any subsystem dependency.
trivial-types
Trivial type definitions
Tomohiro Matsuyama
LLGPL
TRIVIAL-TYPES provides missing but important type
definitions such as PROPER-LIST, ASSOCIATION-LIST, PROPERTY-LIST and
TUPLE.
By using these types, you can keep type declarations more
accurate. For example, you may write a class definition like:
(defclass person ()
((name :type string))
((age :type fixnum))
((friends :type list)))
However, it is not obvious for anyone except you that FRIENDS slot has
only a list of person. If you want declare FRIENDS slot more
accurately, PROPER-LIST is the best for that:
(defclass person ()
((name :type string))
((age :type fixnum))
((friends :type (proper-list person))))
In addition, TRIVIAL-TYPES also provides standard designators defined
in ANSI standard such as PACKAGE-DESIGNATOR. They are useful when you
write a function that takes a package-oid argument like:
(defun list-external-symbols (package)
(declare (package-designator package))
(loop for symbol being the external-symbol of package
collect symbol))
0.1
src
(module).
Modules are listed depth-first from the system components tree.
trivial-types/src
trivial-types
(system).
package.lisp
(file).
specials.lisp
(file).
lists.lisp
(file).
designators.lisp
(file).
streams.lisp
(file).
combinators.lisp
(file).
typespecs.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
trivial-types/trivial-types.asd
trivial-types/src/package.lisp
trivial-types/src/specials.lisp
trivial-types/src/lists.lisp
trivial-types/src/designators.lisp
trivial-types/src/streams.lisp
trivial-types/src/combinators.lisp
trivial-types/src/typespecs.lisp
trivial-types/trivial-types.asd
trivial-types
(system).
trivial-types/src/specials.lisp
package.lisp
(file).
src
(module).
*standard-optimize-qualities*
(special variable).
trivial-types/src/lists.lisp
specials.lisp
(file).
src
(module).
association-list
(type).
association-list-p
(function).
proper-list
(type).
proper-list-p
(function).
property-list
(type).
property-list-p
(function).
tuple
(function).
tuple
(type).
tuplep
(function).
%proper-list-p
(macro).
trivial-types/src/designators.lisp
lists.lisp
(file).
src
(module).
character-designator
(type).
file-position-designator
(type).
function-designator
(type).
list-designator
(type).
package-designator
(type).
pathname-designator
(type).
stream-designator
(type).
string-designator
(type).
trivial-types/src/streams.lisp
designators.lisp
(file).
src
(module).
file-associated-stream
(type).
file-associated-stream-p
(function).
trivial-types/src/combinators.lisp
streams.lisp
(file).
src
(module).
non-nil
(type).
trivial-types/src/typespecs.lisp
combinators.lisp
(file).
src
(module).
type-expand
(function).
type-specifier-p
(function).
Packages are listed by definition order.
trivial-types
common-lisp
.
association-list
(type).
association-list-p
(function).
character-designator
(type).
file-associated-stream
(type).
file-associated-stream-p
(function).
file-position-designator
(type).
function-designator
(type).
list-designator
(type).
non-nil
(type).
package-designator
(type).
pathname-designator
(type).
proper-list
(type).
proper-list-p
(function).
property-list
(type).
property-list-p
(function).
stream-designator
(type).
string-designator
(type).
tuple
(function).
tuple
(type).
tuplep
(function).
type-expand
(function).
type-specifier-p
(function).
%proper-list-p
(macro).
*standard-optimize-qualities*
(special variable).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Returns true if OBJECT is an association list.
Examples:
(association-list-p 1) => NIL (association-list-p ’(1 2 3)) => NIL (association-list-p nil) => T (association-list-p ’((foo))) => T (association-list-p ’((:a . 1) (:b . 2))) => T
Returns true if STREAM is a stream associated to a file.
Returns true if OBJECT is a proper list.
Examples:
(proper-list-p 1) => NIL (proper-list-p ’(1 . 2)) => NIL (proper-list-p nil) => T (proper-list-p ’(1 2 3)) => T
Returns true if OBJECT is a property list.
Examples:
(property-list-p 1) => NIL (property-list-p ’(1 2 3)) => NIL (property-list-p ’(foo)) => NIL (property-list-p nil) => T (property-list-p ’(foo 1)) => T (property-list-p ’(:a 1 :b 2)) => T
Exactly same as LIST.
Returns true if OBJECT is a tuple, meaning a proper list.
Examples:
(tuplep 1) => NIL
(tuplep ’(1 . 2)) => NIL
(tuplep nil) => T
(tuplep ’(1 2 3)) => T
Expand TYPE-SPECIFIER in the lexical environment ENV.
Returns true if TYPE-SPECIFIER is a valid type specfiier.
Equivalent to ‘(proper-list (cons KEY-TYPE VALUE-TYPE))‘. KEY-TYPE
and VALUE-TYPE are just ignored.
Examples:
(typep ’((:a . 1) (:b . 2)) ’(association-list integer)) => T (typep ’((:a . 1) (:b . 2)) ’(association-list string)) => T
Equivalent to ‘(and stream (satisfies file-associated-stream-p))‘.
Equivalent to ‘(and (not null) TYPE)‘ if TYPE is given,
otherwise ‘(not null)‘.
Examples:
(typep nil ’(non-nil symbol)) => NIL
Equivalent to ‘(and list (satisfies proper-list-p))‘. ELEMENT-TYPE
is just ignored.
Examples:
(typep ’(1 2 3) ’(proper-list integer)) => T
(typep ’(1 2 3) ’(proper-list string)) => T
Equivalent to ‘(and list (satisfies
property-list-p))‘. VALUE-TYPE is just ignored.
Examples:
(typep ’(:a 1 :b 2) ’(property-list integer)) => T (typep ’(:a 1 :b 2) ’(property-list string)) => T
Equivalent to ‘(and list (cons ARG1 (cons ARG2 (cons ARG3 ...))))‘
where ARGn is each element of ELEMENT-TYPES.
Examples:
(typep 1 ’tuple) => NIL
(typep ’(1 . 2) ’tuple) => NIL
(typep ’(1 2 3) ’tuple) => NIL
(typep ’(1 2 3) ’(tuple integer integer)) => NIL
(typep ’(1 2 3) ’(tuple string integer integer)) => NIL
(typep nil ’tuple) => T
(typep nil ’(tuple)) => T
(typep ’(1 2 3) ’(tuple integer integer integer)) => T
Jump to: | %
A F M P T |
---|
Jump to: | %
A F M P T |
---|
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*standard-optimize-qualities* : | Private special variables | ||
| |||
S | |||
Special Variable, *standard-optimize-qualities* : | Private special variables | ||
|
Jump to: | *
S |
---|
Jump to: | A C D F L M N P S T |
---|
Jump to: | A C D F L M N P S T |
---|