This is the millet Reference Manual, version 0.5.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:03:51 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
millet
Wrapper for implementation dependent tiny utilities.
SATO Shinichi
(GIT git@github.com:hyotang666/millet)
MIT
# MILLET 0.0.18
Wrapper of implementation dependent tiny utilities.
## Usage
“‘lisp
(function-name #’car) => CAR
(lambda-list #’car) => (#:ARG0)
(global-symbolp ’pi) => T
“‘
## Known altenatives.
### function-name
* clod - Autodoc generator. Internals.
* [swank](https://github.com/slime/slime) - Backend server of SLIME. Internals.
### lambda-list
* [trivial-arguments](https://github.com/Shinmera/trivial-arguments) - Retrieve the lambda-list of a functioni. Externals.
* clod - Autodoc generator. Internals.
* [swank](https://github.com/slime/slime) - Backend server of SLIME. Internals.
### type-specifier-p
* [trivial-types](https://github.com/m2ym/trivial-types) - Trivial type defintions. Externals.
* [swank](https://github.com/slime/slime) - Backend server of SLIME. Internals.
### type-expand
* [trivial-types](https://github.com/m2ym/trivial-types) - Trivial type defintions. Externals.
* [introspect-environment](https://github.com/Bike/introspect-environment) - Portable but nonstandard introspection of CL environments. Externals.
### global-symbol-p
* [definitions](https://github.com/Shinmera/definitions) - General definitions reflection library. Internals.
* clod - Autodoc generator. Internals.
## From developer
### Product’s goal
?
### License
MIT
### Tested with
* SBCL/2.1.10
* CCL/1.12
* ECL/20.4.24
* CLISP/2.49
* Allegro/10.1
* CLASP/2021-05-26 ; Failed.
* CMUCL/21D
* ABCL/1.8.0
### Partially supported.
#### lispworks
- [ ] function-name
- [x] lambda-list
- [ ] global-symbol-p
- [ ] special-symbol-p
- [x] type-expand
- [x] type-specifier-p
- [ ] test
Special thanks to Yehouda about #1!
### Known issues.
#### FUNCTION-NAME
* Local function name is not supported due to ECL and CMUCL specific issue.
#### LAMBDA-LIST
* Common Lisp macro is not supported due to CLISP and CLASP specific issue.
* Local function is not supported due to ECL specific issue.
* The function which is returned from ‘CL:COMPLEMENT‘ is not supported due to SBCL and ECL specific issue.
* The function which is returned from ‘CL:CONSTANTLY‘ is not supported due to CCL and ECL and CMUCL specific issue.
* Funcallable standard class is not supported due to CCL and ECL and CLASP and ABCL specific issue.
#### TYPE-EXPAND
* ECL may get false positive when invalid type specifier form comes.
#### TYPE-SPECIFIER-P
* ECL has [issue](https://gitlab.com/embeddable-common-lisp/ecl/-/issues/570)
* CLASP has same issue.
0.5.1
package.lisp
(file).
sbcl.lisp
(file).
clisp.lisp
(file).
ecl.lisp
(file).
ccl.lisp
(file).
allegro.lisp
(file).
clasp.lisp
(file).
lispworks.lisp
(file).
cmu.lisp
(file).
abcl.lisp
(file).
default.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
millet/millet.asd
millet/package.lisp
millet/sbcl.lisp
millet/clisp.lisp
millet/ecl.lisp
millet/ccl.lisp
millet/allegro.lisp
millet/clasp.lisp
millet/lispworks.lisp
millet/cmu.lisp
millet/abcl.lisp
millet/default.lisp
millet/package.lisp
millet
(system).
canonicalize-type-specifier
(function).
incomplete
(function).
not-support
(function).
millet/sbcl.lisp
:sbcl
package.lisp
(file).
millet
(system).
function-name
(function).
global-symbol-p
(function).
lambda-list
(function).
type-expand
(function).
type-specifier-p
(function).
millet/clisp.lisp
:clisp
sbcl.lisp
(file).
package.lisp
(file).
millet
(system).
millet/ecl.lisp
:ecl
clisp.lisp
(file).
sbcl.lisp
(file).
package.lisp
(file).
millet
(system).
millet/ccl.lisp
:ccl
ecl.lisp
(file).
clisp.lisp
(file).
sbcl.lisp
(file).
package.lisp
(file).
millet
(system).
millet/allegro.lisp
:allegro
ccl.lisp
(file).
ecl.lisp
(file).
clisp.lisp
(file).
sbcl.lisp
(file).
package.lisp
(file).
millet
(system).
millet/clasp.lisp
:clasp
allegro.lisp
(file).
ccl.lisp
(file).
ecl.lisp
(file).
clisp.lisp
(file).
sbcl.lisp
(file).
package.lisp
(file).
millet
(system).
millet/lispworks.lisp
:lispworks
clasp.lisp
(file).
allegro.lisp
(file).
ccl.lisp
(file).
ecl.lisp
(file).
clisp.lisp
(file).
sbcl.lisp
(file).
package.lisp
(file).
millet
(system).
millet/cmu.lisp
:cmu
lispworks.lisp
(file).
clasp.lisp
(file).
allegro.lisp
(file).
ccl.lisp
(file).
ecl.lisp
(file).
clisp.lisp
(file).
sbcl.lisp
(file).
package.lisp
(file).
millet
(system).
millet/abcl.lisp
:abcl
cmu.lisp
(file).
lispworks.lisp
(file).
clasp.lisp
(file).
allegro.lisp
(file).
ccl.lisp
(file).
ecl.lisp
(file).
clisp.lisp
(file).
sbcl.lisp
(file).
package.lisp
(file).
millet
(system).
millet/default.lisp
abcl.lisp
(file).
cmu.lisp
(file).
lispworks.lisp
(file).
clasp.lisp
(file).
allegro.lisp
(file).
ccl.lisp
(file).
ecl.lisp
(file).
clisp.lisp
(file).
sbcl.lisp
(file).
package.lisp
(file).
millet
(system).
special-symbol-p
(function).
already-defined-p
(function).
defaultp
(function).
mark-as-default
(function).
Packages are listed by definition order.
millet
common-lisp
.
function-name
(function).
global-symbol-p
(function).
lambda-list
(function).
special-symbol-p
(function).
type-expand
(function).
type-specifier-p
(function).
already-defined-p
(function).
canonicalize-type-specifier
(function).
defaultp
(function).
incomplete
(function).
mark-as-default
(function).
not-support
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
# FUNCTION-NAME
## Description:
accept function, return its name.
“‘lisp
#?(function-name #’car)
=> CAR
“‘
### syntax
(FUNCTION-NAME function)
=> result
## Arguments and Values:
function := function, otherwise error.
“‘lisp
#?(function-name ’car)
:signals error
“‘
result := symbol
## Affected By:
none
## Side-Effects:
none
## Notes:
When lambda function comes, nil is returned.
“‘lisp
#?(function-name #’(lambda () (print :hoge)))
=> NIL
“‘
When local function comes, unspecified.
“‘lisp
#?(function-name (flet ((test () :hoge)) #’test))
=> unspecified
“‘
“‘lisp
#?(function-name (labels ((test () :hoge)) #’test))
=> unspecified
“‘
ECL needs above spec.
Without compile, it works.
But with compile.
not works.
ECL specific two tests above are as observer.
When failed, MILLET needs to change spec or impl.
# Comment out due to error "Defined in a non-null environment.
#+cmu
#?(function-name (compile nil (flet ((test () :hoge)) #’test))) => "LAMBDA NIL"
,:test equal
; not works.
# Comment out since above ECL specific needs.
; CCL specific issue. (macro) returns (:INTERNAL HOGE MACRO).
#?(defmacro macro ()
(flet ((hoge ()))
‘’,(function-name #’hoge)))
=> MACRO
,:before (fmakunbound ’macro)
#?(macro)
=> HOGE
SBCL specific issue. FORMATTER returns e.g. "fmt$~A".
When FORMATTER comes, return NIL.
“‘lisp
#?(function-name (formatter "~A"))
=> NIL
“‘
When setf function comes, (SETF NAME) is returned.
“‘lisp
#?(defclass foo () ((bar :accessor foo-bar)))
:satisfies (lambda ($arg)
(& (typep $arg ’standard-class)
(eq ’foo (class-name $arg))))
, :before
“‘
.
“‘lisp
#?(function-name (fdefinition ’(setf foo-bar)))
=> (SETF FOO-BAR)
, :test
“‘
## Exceptional-Situations:
# GLOBAL-SYMBOL-P
## Description:
tests arg is global-symbol or not.
“‘lisp
#?(global-symbol-p ’*package*)
=> T
“‘
“‘lisp
#?(let (local)
(declare (ignore local))
(global-symbol-p ’local))
=> NIL
“‘
“‘lisp
#?(global-symbol-p ’car)
=> NIL
“‘
“‘lisp
#?(global-symbol-p :key)
=> T
“‘
### syntax
(GLOBAL-SYMBOL-P symbol)
=> result
## Arguments and Values:
symbol := symbol which is global symbol.
result := boolean
## Affected By:
none
## Side-Effects:
none
## Notes:
## Exceptional-Situations:
# LAMBDA-LIST
## Description:
accept function, return its lambda-list
“‘lisp
#?(lambda-list #’lambda-list)
=> (MILLET::ARG)
, :test
“‘
### syntax
(LAMBDA-LIST arg)
=> result
## Arguments and Values:
arg := function designator, otherwise error
“‘lisp
#?(lambda-list :not-function-designator)
:signals error
“‘
result := lambda-list
## Affected By:
none
## Side-Effects:
none
## Notes:
## Exceptional-Situations:
function is not defined, an error is signaled.
“‘lisp
#?(lambda-list ’no-such-function)
:signals error
“‘
## Tests.
Works with generic-function.
“‘lisp
#?(lambda-list ’documentation)
:satisfies (lambda (result)
(& (listp result)
(= 2 (length result))))
“‘
Works with macros.
“‘lisp
#?(defmacro test (a) ‘,a)
=> TEST
, :before
“‘
“‘lisp
#?(lambda-list ’test)
=> (A)
, :test
“‘
Not support CL macros due to clisp can not.
“‘lisp
#?(lambda-list ’when)
=> unspecified
“‘
CLISP specific guard.
Works with lambda.
“‘lisp
#?(lambda-list (lambda (a) a))
=> (A)
, :test
“‘
Works with lambda-form.
“‘lisp
#?(lambda-list ’(lambda (a) a))
=> (A)
, :test
“‘
Not supported local functions due to ECL specific issue.
“‘lisp
#?(lambda-list (flet ((test (a) a)) #’test))
=> unspecified
“‘
ECL specific guard.
Works with ’(setf fun-name).
“‘lisp
#?(lambda-list ’(setf foo-bar))
:satisfies (lambda (result)
(typep result ’(cons symbol (cons symbol null))))
“‘
Works with formatter.
“‘lisp
#?(lambda-list (formatter "~A"))
:satisfies (lambda (result)
(typep result ’(cons symbol *)))
“‘
Not works with complement.
“‘lisp
#?(lambda-list (complement #’car))
=> unspecified
“‘
Due to in SBCL, lambda list will change after compile.
Before compile (&REST SB-IMPLE::ARGUMENTS)
After compile (#:G1).
Not works with constantly due to ccl could not.
“‘lisp
#?(lambda-list (constantly nil))
=> unspecified
“‘
“‘lisp
#?(lambda-list (constantly nil))
=> NIL
“‘
Not works with funcallable-standard-class
“‘lisp
#?(defclass fun ()
()
(:metaclass c2mop:funcallable-standard-class))
:be-the c2mop:funcallable-standard-class
, :ignore-signals
“‘
cmu needs.
“‘lisp
#?(let ((fun (make-instance ’fun)))
(c2mop:set-funcallable-instance-function fun #’car)
(lambda-list fun))
=> unspecified
“‘
“‘lisp
#?(let ((fun (make-instance ’fun)))
(c2mop:set-funcallable-instance-function fun #’car)
(lambda-list fun))
=> NIL
“‘
“‘lisp
#?(let ((fun (make-instance ’fun)))
(c2mop:set-funcallable-instance-function fun #’car)
(lambda-list fun))
:signals error
“‘
“‘lisp
#?(let ((fun (make-instance ’fun)))
(c2mop:set-funcallable-instance-function fun #’car)
(lambda-list fun))
:satisfies (lambda (result)
(& (symbolp result)
(equal "UNBOUND" (symbol-name result))))
“‘
# SPECIAL-SYMBOL-P
## Description:
Tests arg is special symbol or not.
### syntax
(SPECIAL-SYMBOL-P symbol)
=> result
“‘lisp
#?(special-symbol-p ’*package*)
=> T
“‘
“‘lisp
#?(special-symbol-p ’car)
=> NIL
“‘
“‘lisp
#?(special-symbol-p :keyword)
=> NIL
“‘
## Arguments and Values:
symbol := symbol, otherwise error.
“‘lisp
#?(special-symbol-p "not symbol")
:signals error
“‘
result := boolean
## Affected By:
none
## Side-Effects:
none
## Notes:
## Exceptional-Situations:
# TYPE-EXPAND
## Description:
expand user defined type specifier.
“‘lisp
#?(deftype function-name ()
’(or function symbol))
=> FUNCTION-NAME
“‘
“‘lisp
#?(type-expand ’function-name)
=> (OR FUNCTION SYMBOL)
, :test
“‘
### syntax
(TYPE-EXPAND type)
=> result
## Arguments and Values:
type := type-specifier, otherwise return arg itself.
“‘lisp
#?(type-expand "not type specifier")
=> "not type specifier"
, :test
“‘
result := 2 values
1. type specifier which may expanded.
2. boolean which represents type specifier is expanded or not.
“‘lisp
#?(type-expand ’function-name)
:values ((OR FUNCTION SYMBOL)
T)
“‘
“‘lisp
#?(type-expand ’symbol)
:values (SYMBOL
NIL)
“‘
“‘lisp
#?(type-expand ’(function-name invalid form))
:values ((FUNCTION-NAME INVALID FORM)
NIL)
“‘
## Affected By:
none
## Side-Effects:
none
## Notes:
## Exceptional-Situations:
# TYPE-SPECIFIER-P
## Description:
Tests arg is type-specifier or not.
“‘lisp
#?(type-specifier-p ’function-name)
=> T
“‘
“‘lisp
#?(type-specifier-p :not-type-specifier)
=> NIL
“‘
“‘lisp
#?(type-specifier-p ’(unsigned-byte 8))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(mod 4))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(not symbol))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(integer 4 9))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(or symbol string))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(eql 4))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(satisfies listp))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(and list (not null)))
=> T
“‘
“‘lisp
#?(type-specifier-p t)
=> T
“‘
“‘lisp
#?(type-specifier-p nil)
=> T
“‘
“‘lisp
#?(type-specifier-p ’structure-object)
=> T
“‘
#### Added due to CCL specific issue.
“‘lisp
#?(type-specifier-p ’(keyword string))
=> NIL
“‘
#### When CCL is Fixed, code should be modified.
#### Added due to ECL specific issue.
“‘lisp
#?(defstruct (struct (:copier nil) (:predicate nil)))
=> STRUCT
, :before
“‘
“‘lisp
#?(type-specifier-p (make-struct))
=> NIL
“‘
“‘lisp
#?(type-specifier-p ’struct)
=> T
“‘
“‘lisp
#?(typep nil (make-struct))
=> NIL
“‘
#### Added due to ECL specific issue. Already issued in gitlab.
“‘lisp
#?(type-specifier-p ’(t 0))
=> NIL
“‘
“‘lisp
#?(type-specifier-p ’(t))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(function-name invalid specifier form))
=> NIL
“‘
“‘lisp
#?(typep nil ’(t 0))
=> T
“‘
#### Cornercase: CMUCL needs.
“‘lisp
#?(type-specifier-p ’(or bit unknown))
=> NIL
“‘
“‘lisp
#?(type-specifier-p ’(or bit symbol))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(not unknown))
=> NIL
“‘
“‘lisp
#?(type-specifier-p ’(not symbol))
=> T
“‘
“‘lisp
#?(type-specifier-p ’(and bit unknown))
=> NIL
“‘
“‘lisp
#?(type-specifier-p ’(and vector string))
=> T
“‘
“‘lisp
#?(type-specifier-p ’keyword)
=> T
“‘
### syntax
(TYPE-SPECIFIER-P type)
=> result
## Arguments and Values:
type := any lisp object.
result := boolean
## Affected By:
none
## Side-Effects:
none
## Notes:
## Exceptional-Situations:
Is the default function?
Set the mark of the millet default function to symbol-plist.
Jump to: | A C D F G I L M N S T |
---|
Jump to: | A C D F G I L M N S T |
---|
Jump to: | A C D E F L M P S |
---|
Jump to: | A C D E F L M P S |
---|