Changeset 36033 in project


Ignore:
Timestamp:
08/04/18 22:28:39 (14 months ago)
Author:
Kon Lovett
Message:

rel 3.1.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/apropos

    r35822 r36033  
    1010An ''apropos'' facility for Chicken Scheme.
    1111
    12 When loaded by the interpreter {{csi}} {{apropos}} provides the interpreter
    13 command {{a}}.
    14 
    1512=== Apropos API
     13
     14== Usage
     15
     16<enscript language=scheme>
     17(import apropos-api)
     18</enscript>
    1619
    1720==== apropos
     
    5558; {{'(procedure . <core procedure name>)}} :
    5659
     60==== apropos-default-base
     61
     62<parameter>(apropos-default-base [BASE]) -> fixnum</parameter>
     63
     64{{BASE}} is a {{fixnum}} in {{[2 16]}}, default {{10}}.
     65
    5766==== apropos-default-options
    5867
    5968<parameter>(apropos-default-options [OPTIONS]) -> list</parameter>
    6069
    61 {{OPTIONS}} is an {{apropos}} #!key argument list.
    62 
    63 Default {{'()}}.
     70{{OPTIONS}} is an {{apropos}} #!key argument list, default {{'()}}.
    6471
    6572==== apropos-interning
     
    6774<parameter>(apropos-interning [FLAG]) -> boolean</parameter>
    6875
    69 Use {{string->symbol}} - {{#t}} - or {{string->uninterned-symbol}} - {{#f}}.
    70 
    71 Default {{#t}}.
    72 
    73 === Interpreter Usage
    74 
    75 A {{csi}} toplevel-command is added when the {{apropos}} extension is loaded:
    76 {{,a PATTERN ARGUMENT...}}.
    77 
    78 {{ARGUMENT}} is interpreted as:
    79 
    80 ; {{mac[ros]}} : {{#:macros? #t}}
    81 ; {{qual[ified]}} : {{#:qualified? #t}}
    82 ; {{sort [name|module|type|#f]}} : {{#:sort #:name|#:module|#:type|#f}}
    83 ; {{split [name|module|#f]}} : {{#:split #:name|#:module|#f}}
    84 ; {{case-insensitve|ci}} : {{#:case-insensitive? #t}}
    85 ; {{base 2..16}} : {{#:base 2..16}}
    86 
    87 The command is interpreted by the {{apropos}} procedure, but sort by type is
    88 the default.
    89 
    90 Example:
    91 
    92 <enscript language=scheme>
    93 #;1> ,a print qualified macros sort name
    94 char-set:printing                            variable
    95 define-record-printer                        macro
    96 flonum-print-precision                       procedure tmp
    97 fprintf                                      procedure (port fstr . args)
    98 max-symbol-printname-length    symbol-utils  procedure (syms)
    99 pretty-print                                 procedure (obj . opt)
    100   ...
    101 ##sys#register-record-printer                procedure (type proc)
    102 ##sys#repl-print-hook                        procedure (x port)
    103 ##sys#repl-print-length-limit                variable
    104 ##sys#user-print-hook                        procedure (x readable port)
    105 ##sys#with-print-length-limit                procedure (limit thunk)
    106 </enscript>
    107 
    108 <enscript language=scheme>
    109 #;1> ,a '"w.*e" macros
    110 eval-when                                    macro
    111 when                                         macro
    112 bitwise-and                                  procedure xs
    113 bitwise-ior                                  procedure xs
    114 bitwise-not                                  procedure (x)
    115 bitwise-xor                                  procedure xs
    116 call-with-current-continuation               procedure (proc)
    117   ...
    118 write-string                                 procedure (s . more)
    119 char-set:lower-case                          variable
    120 char-set:whitespace                          variable
    121 </enscript>
    122 
    123 <enscript language=scheme>
    124 #;1> ,a '(: (* any)) qualified macros sort name
    125 *                                                           procedure C_times
    126   ... 1600 lines + ...
    127 ##sys#write-char/port                                       procedure (c port)
    128 </enscript>
    129 
    130 
    131 == Usage
    132 
    133 <enscript language=scheme>
    134 (require-extension apropos)
    135 </enscript>
     76Use {{string->symbol}} - {{#t}} - or {{string->uninterned-symbol}} - {{#f}},
     77default {{#t}}.
    13678
    13779
     
    235177</enscript>
    236178
     179=== Apropos CSI
     180
     181== Usage
     182
     183<enscript language=scheme>
     184(import apropos-csi)
     185</enscript>
     186
     187A {{csi}} toplevel-command is added when the {{apropos-csi}} extension is
     188loaded by the interpreter, {{a}}.
     189
     190{{,a PATTERN ARGUMENT ...}}
     191
     192{{ARGUMENT}} is interpreted as:
     193
     194; {{mac[ros]}} : {{#:macros? #t}}
     195; {{qual[ified]}} : {{#:qualified? #t}}
     196; {{sort [name|module|type|#f]}} : {{#:sort #:name|#:module|#:type|#f}}
     197; {{split [name|module|#f]}} : {{#:split #:name|#:module|#f}}
     198; {{case-insensitve|ci}} : {{#:case-insensitive? #t}}
     199; {{base 2..16}} : {{#:base 2..16}}
     200
     201The command is interpreted by the {{apropos}} procedure, but sort by type is
     202the default.
     203
     204Example:
     205
     206<enscript language=scheme>
     207#;1> ,a print qualified macros sort name
     208char-set:printing                            variable
     209define-record-printer                        macro
     210flonum-print-precision                       procedure tmp
     211fprintf                                      procedure (port fstr . args)
     212max-symbol-printname-length    symbol-utils  procedure (syms)
     213pretty-print                                 procedure (obj . opt)
     214  ...
     215##sys#register-record-printer                procedure (type proc)
     216##sys#repl-print-hook                        procedure (x port)
     217##sys#repl-print-length-limit                variable
     218##sys#user-print-hook                        procedure (x readable port)
     219##sys#with-print-length-limit                procedure (limit thunk)
     220</enscript>
     221
     222<enscript language=scheme>
     223#;1> ,a '"w.*e" macros
     224eval-when                                    macro
     225when                                         macro
     226bitwise-and                                  procedure xs
     227bitwise-ior                                  procedure xs
     228bitwise-not                                  procedure (x)
     229bitwise-xor                                  procedure xs
     230call-with-current-continuation               procedure (proc)
     231  ...
     232write-string                                 procedure (s . more)
     233char-set:lower-case                          variable
     234char-set:whitespace                          variable
     235</enscript>
     236
     237<enscript language=scheme>
     238#;1> ,a '(: (* any)) qualified macros sort name
     239*                                                           procedure C_times
     240  ... 1600 lines + ...
     241##sys#write-char/port                                       procedure (c port)
     242</enscript>
     243
     244
     245== Usage
     246
     247<enscript language=scheme>
     248(import apropos)
     249</enscript>
     250
     251* Exports {{apropos-api}} & {{apropos-csi}}.
     252
    237253
    238254== Requirements
    239255
    240 [[regex]]
    241256[[check-errors]]
    242257[[miscmacros]]
     
    273288== Version history
    274289
     290; 3.1.0 : Add {{apropos-api}} & {{apropos-csi}}. Add {{apropos-default-base}}, {{check-apropos-number-base}}, {{apropos-sort-key?}}, {{check-apropos-sort-key}}, & {{error-apropos-sort-key}}.
    275291; 3.0.0 : CHICKEN 5 release.
    276292; 2.7.2 : Expanded help text.
Note: See TracChangeset for help on using the changeset viewer.