Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the mcase Reference Manual, version 1.2.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Sun May 15 05:31:53 2022 GMT+0.
• Introduction | What mcase is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Control frow macros with case comprehensiveness checking.
* (deftype state ()
'(member :a :b :c))
STATE
* (mcase:mcase state :hoge
(:a "A")
(:b "B"))
=> ERROR Missing member (:C) :of STATE
For details, see spec file.
Public domain.
SBCL
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The mcase system |
SATO Shinichi
(:git "git@github.com:hyotang666/mcase")
Public domain
Control frow macros with case comprehensiveness checking.
1.2.1
millet
mcase.asd (file)
mcase.lisp (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The mcase.asd file | ||
• The mcase/mcase.lisp file |
Next: The mcase/mcase․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
/home/quickref/quicklisp/dists/quicklisp/software/mcase-20211020-git/mcase.asd
mcase (system)
Previous: The mcase․asd file, Up: Lisp files [Contents][Index]
mcase (system)
mcase.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The mcase package |
mcase.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported macros |
Previous: Exported definitions, Up: Exported definitions [Contents][Index]
# EMCASE
## Description:
A thin wrapper for CL:ECASE to check MEMBER comprehensiveness in macro expansion time.
### syntax (EMCASE type <target> &body clauses)
=> result
type := type-specifer, otherwise implementation dependent condition.
“‘lisp
#?(emcase "not type specifier" :dummy)
:signals condition
, :lazy
“‘
<target> := Expression to generate target value.
clause* := Same with CL:ECASE.
result := T.
## Affected By:
none
## Side-Effects:
none
## Notes:
## Exceptional-Situations:
When type specifier is not expanded to (MEMBER ...) an error is signaled.
“‘lisp
#?(emcase (unsigned-byte 8) :dummy)
:signals error
, :lazy
“‘
## Examples:
“‘lisp
#?(emcase state :dummy (:a "Missing :b and :c members"))
:signals error
, :lazy
“‘
“‘lisp
#?(emcase state :dummy ((:a :b :c) "Works fine."))
:signals error
“‘
“‘lisp
#?(emcase state :dummy
((:a :b :c) "Fine but")
(:d "Ooops! Unknown member is found!"))
:signals error
, :lazy
“‘
mcase.lisp (file)
# MCASE
## Description:
A thin wrapper for CL:CASE to check MEMBER comprehensiveness in macro expansion time.
### syntax (MCASE type <target> &body clause\*)
=> result
## Arguments and Values:
type := type-specifer, otherwise implementation dependent condition.
“‘lisp
#?(mcase "not type specifier" :dummy)
:signals condition
, :lazy
“‘
<target> := Expression to generate target value.
clause* := Same with CL:CASE.
result := T.
## Affected By:
none
## Side-Effects:
none
## Notes:
## Exceptional-Situations:
When type specifier is not expanded to (MEMBER ...) an error is signaled.
“‘lisp
#?(mcase (unsigned-byte 8) :dummy)
:signals error
, :lazy
“‘
Ordinary otherwise clause is invalid because in such case you should use CASE.
“‘lisp
#?(mcase (member 0 1 2) :dummy
((0 1 2) :yes)
(otherwise :no))
:signals error
, :lazy
“‘
One exceptional situation is OTHERWISE in the MEMBER.
“‘lisp
#?(mcase (member 0 1 2 otherwise) :dummy
((0 1 2) :yes)
(otherwise :no))
=> :NO
“‘
## Examples:
“‘lisp
#?(deftype state () ’(member :a :b :c))
=> STATE
“‘
“‘lisp
#?(mcase state :dummy (:a "Missing :b and :c members"))
:signals error
, :lazy
“‘
“‘lisp
#?(mcase state :dummy ((:a :b :c) "Works fine."))
=> NIL
“‘
“‘lisp
#?(mcase state :dummy
((:a :b :c) "Fine but")
(:d "Ooops! Unknown member is found!"))
:signals error
, :lazy
“‘
mcase.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal functions |
Previous: Internal definitions, Up: Internal definitions [Contents][Index]
mcase.lisp (file)
mcase.lisp (file)
mcase.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L M |
---|
Jump to: | F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | C E F M P |
---|
Jump to: | C E F M P |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | M P S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
M | |||
mcase : | The mcase system | ||
mcase : | The mcase package | ||
| |||
P | |||
Package, mcase : | The mcase package | ||
| |||
S | |||
System, mcase : | The mcase system | ||
|
Jump to: | M P S |
---|