source: project/wiki/eggref/4/apropos @ 13728

Last change on this file since 13728 was 13728, checked in by Kon Lovett, 11 years ago

Added sorting.

File size: 4.3 KB
Line 
1[[tags: egg]]
2
3== apropos
4
5[[toc:]]
6
7
8== Documentation
9
10An ''apropos'' facility for Chicken Scheme.
11
12==== apropos
13
14<procedure>(apropos PATTERN [ENVIRONMENT] [#:macros? MACROS?] [#:qualified? QUALIFIED?] [#:sort? SORT?])</procedure>
15
16Displays information about identifiers matching {{PATTERN}} in the
17{{ENVIRONMENT}} and, optionally, a {{MACRO-ENVIRONMENT}}.
18
19; {{PATTERN}} : A {{symbol}}, {{string}} or {{regexp}}. When symbol or string substring matching is performed.
20; {{ENVIRONMENT}} : An environment. When missing the {{(interaction-environment)}} is assumed.
21; {{MACROS?}} : A boolean. Include macros?
22; {{QUALIFIED?}} : A boolean. Include qualified identifiers?
23; {{SORT?}} : Either {{#f}} for no sorting, a less-than predicate {{procedure}}, or {{#t}} for the default sort order of {{string<?}}.
24
25==== apropos-list
26
27<procedure>(apropos-list PATTERN [ENVIRONMENT] [#:macros? MACROS?] [#:qualified? QUALIFIED?] [#:sort? SORT?])</procedure>
28
29Like {{apropos}} but returns a list of matching identifiers.
30
31==== apropos-information-list
32
33<procedure>(apropos-information-list PATTERN [ENVIRONMENT] [#:macros? MACROS?] [#:qualified? QUALIFIED?] [#:sort? SORT?])</procedure>
34
35Like {{apropos}} but returns an association list keyed by symbol. The
36associated information is either {{'macro}}, {{'keyword}}, {{'variable}},
37{{'procedure}}, {{'(procedure . <lambda-list-specification>)}} or
38{{'(procedure . <core procedure name>)}}.
39
40==== apropos/environment
41
42<procedure>(apropos/environment PATTERN ENVIRONMENT [#:qualified? QUALIFIED?] [#:sort? SORT?])</procedure>
43
44Displays information about identifiers matching {{PATTERN}} in the
45{{ENVIRONMENT}}.
46
47Like {{apropos}}.
48
49; {{ENVIRONMENT}} : An {{environment}} or a {{syntactic-environment}}.
50
51==== apropos-list/environment
52
53<procedure>(apropos-list/environment PATTERN ENVIRONMENT [#:qualified? QUALIFIED?] [#:sort? SORT?])</procedure>
54
55Like {{apropos-list}}.
56
57==== apropos-information-list/environment
58
59<procedure>(apropos-information-list/environment PATTERN ENVIRONMENT [#:qualified? QUALIFIED?] [#:sort? SORT?])</procedure>
60
61Like {{apropos-information-list}}.
62
63
64==== apropos/environments
65
66<procedure>(apropos/environments PATTERN [#:qualified? QUALIFIED?] [#:sort? SORT?] ENVIRONMENT...)</procedure>
67
68Displays information about identifiers matching {{PATTERN}} in each
69{{ENVIRONMENT}}.
70
71Like {{apropos}}.
72
73; {{PATTERN}} : A {{symbol}}, {{string}} or {{regexp}}. When symbol or string substring matching is performed.
74
75==== apropos-list/environments
76
77<procedure>(apropos-list/environments PATTERN [#:qualified? QUALIFIED?] [#:sort? SORT?] ENVIRONMENT...)</procedure>
78
79
80Like {{apropos-list}}.
81
82==== apropos-information-list/environments
83
84<procedure>(apropos-information-list/environments PATTERN [#:qualified? QUALIFIED?] [#:sort? SORT?] ENVIRONMENT...)</procedure>
85
86Like {{apropos-information-list}}.
87
88
89== Usage
90
91<enscript language=scheme>
92(require-library apropos)
93(import apropos)
94</enscript>
95
96or
97
98<enscript language=scheme>
99(require-extension apropos)
100(import apropos)
101</enscript>
102
103
104== Examples
105
106
107== Notes
108
109
110== Requirements
111
112[[Unit regex|regex]]
113[[Unit lolevel|lolevel]]
114
115== Bugs and Limitations
116
117* Doesn't show something similar to procedure-information for macros.
118
119
120== Author
121
122[[kon lovett]]
123
124
125== Version history
126
127; 1.0.0 : Chicken 4 release.
128
129
130== License
131
132Copyright (C) 2009 Kon Lovett.  All rights reserved.
133
134Permission is hereby granted, free of charge, to any person obtaining a
135copy of this software and associated documentation files (the Software),
136to deal in the Software without restriction, including without limitation
137the rights to use, copy, modify, merge, publish, distribute, sublicense,
138and/or sell copies of the Software, and to permit persons to whom the
139Software is furnished to do so, subject to the following conditions:
140
141The above copyright notice and this permission notice shall be included
142in all copies or substantial portions of the Software.
143
144THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
145IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
146FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
147THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
148OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
149ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
150OTHER DEALINGS IN THE SOFTWARE.
Note: See TracBrowser for help on using the repository browser.