The query-repl Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The query-repl Reference Manual

This is the query-repl Reference Manual, version 4.1.4, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 05:39:17 2022 GMT+0.

Table of Contents


1 Introduction

QUERY-REPL 4.0.9

What is this?

REPL for user query.

Alternatives and differences.

| | duologue | text-query | query-repl | | --- | ---------- | ------------ | ---------- | | Coloring | * | | | | Default | * | | | | Completion | * | | | | Return some | * | | | | Validation | * | | | | Timeout | | * | | | REPL | | | * | | Pagenation | | | * |

Usage

For details, see spec file.

QUERY-CASE

The syntax is almost same with cl:restart-case except the first argument and :test keyword param. First argument should print query message. The return value of the first argument is discarded.

* (query-case (write-line "Choose one of below." *query-io*)
    (one () :report "One!" 1)
    (two () :report "Two!" 2)
    (input (input) :interactive (lambda () (format *query-io* "Input>> ")
                                  (force-output *query-io*)
                                  (list (read)))
      input))
Choose one of below.

  0: [ONE  ] One!
  1: [TWO  ] Two!
  2: [INPUT] Invoke restart INPUT.

;; You can do anything in REPL.
> (+ 1 2 3)

6

;; To choose restart, type integer or restart-name.
  0: [ONE] One!
  1: [TWO] Two!
  2: [INPUT] Invoke restart INPUT.
> 2
Input>> "hoge"
"hoge"
*

*QUERY-EVAL*

If you do not need the full power of REPL, you can bind *QUERY-EVAL* with NIL. In such cases, QUERY-REPL acts as echo REPL, and CL:*READ-EVAL* is bound by NIL automatically.

* (let (*query-eval*)
    (query-case (write-line "Works like echo." *query-io*)
      (one () :report "One" 1)))
Works like echo.

  0: [ONE] One
> (+ 1 2 3)

(+ 1 2 3)
  0: [ONE] One

;; Reader error is ignored.
> #.(+ 1 2 3)
WARNING:
   Ignore: can't read #. while *READ-EVAL* is NIL

             Stream: #<SYNONYM-STREAM :SYMBOL *TERMINAL-IO* {10000385B3}>

NIL
  0: [ONE] One
> )
WARNING:
   Ignore: unmatched close parenthesis

             Stream: #<SYNONYM-STREAM :SYMBOL *TERMINAL-IO* {10000385B3}>

NIL
  0: [ONE] One
> no-such-package:symbol
WARNING:
   Ignore: Package NO-SUCH-PACKAGE does not exist.

             Stream: #<SYNONYM-STREAM :SYMBOL *TERMINAL-IO* {10000385B3}>

NIL
  0: [ONE] One

;; Ctl-C is also ignored.
> WARNING: Ignore: Interactive interrupt at #x7F31187D3CF9.

NIL
  0: [ONE] One

;; Ctl-D is also ignored.
> WARNING:
   Ignore: end of file on #<SB-SYS:FD-STREAM for "the terminal" {1001578A53}>

NIL
  0: [ONE] One

> 0
1

SELECT

When selection is dynamic values, you can use SELECT.

* (select (list 1 'symbol #'car))

  0: [SELECT] 1
  1: [SELECT] SYMBOL
  2: [SELECT] #<FUNCTION CAR>
> 2
#<FUNCTION CAR>

PAGED-SELECT

If selection is big, PAGED-SELECT may helps you.

* (paged-select (loop :for i :below 20 :collect i))

  0: [SELECT] #:NEXT
  1: [SELECT] 0
  2: [SELECT] 1
  3: [SELECT] 2
  4: [SELECT] 3
  5: [SELECT] 4
  6: [SELECT] 5
  7: [SELECT] 6
  8: [SELECT] 7
  9: [SELECT] 8
> 0

  0: [SELECT] #:NEXT
  1: [SELECT] #:PREV
  2: [SELECT] 9
  3: [SELECT] 10
  4: [SELECT] 11
  5: [SELECT] 12
  6: [SELECT] 13
  7: [SELECT] 14
  8: [SELECT] 15
  9: [SELECT] 16
> 5
12
*

&KEY MAX

To specify max selection num, use the keyword parameter :MAX (the default is 10).

NOTE

The selection includes NEXT and/or PREV.

* (paged-select (loop :for i :below 20 :collect i)
                :max 5)

  0: [SELECT] #:NEXT
  1: [SELECT] 0
  2: [SELECT] 1
  3: [SELECT] 2
  4: [SELECT] 3
>

&KEY KEY

When keyword parameter :KEY is specified, such function is applied to each element of selection.

NOTE

The :KEY function is applied only to printed selection. If the user selects from the first page, the rest elements are never applied.

* (paged-select (loop :for i :below 20 :collect i)
                :key (lambda (x) (princ x) (force-output) (princ-to-string x)))
012345678               ; <--- The function applied only first page elements.
  0: [SELECT] #:NEXT
  1: [SELECT] "0"
  2: [SELECT] "1"
  3: [SELECT] "2"
  4: [SELECT] "3"
  5: [SELECT] "4"
  6: [SELECT] "5"
  7: [SELECT] "6"
  8: [SELECT] "7"
  9: [SELECT] "8"
> 0                     ; <--- Choose next page.
910111213141516         ; <--- The function applied only this page elements.
  0: [SELECT] #:NEXT
  1: [SELECT] #:PREV
  2: [SELECT] "9"
  3: [SELECT] "10"
  4: [SELECT] "11"
  5: [SELECT] "12"
  6: [SELECT] "13"
  7: [SELECT] "14"
  8: [SELECT] "15"
  9: [SELECT] "16"
> 1                     ; <--- Choose previous page.
                        ; <--- The function is not applied.
  0: [SELECT] #:NEXT
  1: [SELECT] "0"
  2: [SELECT] "1"
  3: [SELECT] "2"
  4: [SELECT] "3"
  5: [SELECT] "4"
  6: [SELECT] "5"
  7: [SELECT] "6"
  8: [SELECT] "7"
  9: [SELECT] "8"
> 0

  0: [SELECT] #:NEXT
  1: [SELECT] #:PREV
  2: [SELECT] "9"
  3: [SELECT] "10"
  4: [SELECT] "11"
  5: [SELECT] "12"
  6: [SELECT] "13"
  7: [SELECT] "14"
  8: [SELECT] "15"
  9: [SELECT] "16"
> 0
171819
  0: [SELECT] #:PREV
  1: [SELECT] "17"
  2: [SELECT] "18"
  3: [SELECT] "19"
> 1

"17"
*

From developer

Product's goal

?

License

MIT

Developed with

SBCL

Tested with

Installation

Quicklisp supported.

(ql:quickload :query-repl)

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 query-repl

REPL for user query.

Author

SATO Shinichi

Source Control

(GIT git@github.com:hyotang666/query-repl)

Bug Tracker

https://github.com/hyotang666/query-repl/issues

License

MIT

Version

4.1.4

Dependencies
  • check-bnf (system).
  • uiop (system).
Source

query-repl.asd.

Child Component

query-repl.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 query-repl/query-repl.asd

Source

query-repl.asd.

Parent Component

query-repl (system).

ASDF Systems

query-repl.


3.1.2 query-repl/query-repl.lisp

Source

query-repl.asd.

Parent Component

query-repl (system).

Packages

query-repl.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 query-repl

Source

query-repl.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


Next: , Previous: , Up: Public Interface   [Contents][Index]

5.1.1 Special variables

Special Variable: *prompt*

# \*PROMPT\*

## Description:

## Value type is T.

“‘lisp
#?
*PROMPT* :be-the “‘
Initial value is ‘">"‘

## Affected By: QUERY-PROMPT

## Notes:

Package

query-repl.

Source

query-repl.lisp.

Special Variable: *query-eval*

# \*QUERY-EVAL\*

## Description:

## Value type is BOOLEAN

“‘lisp
#?
*QUERY-EVAL* :be-the “‘
Initial value is ‘T‘

## Affected By: QUERY-READ, QUERY-EVAL

## Notes:

Package

query-repl.

Source

query-repl.lisp.


5.1.2 Macros

Macro: query-bind (binds &body body)

# QUERY-BIND

## Description:

### syntax (QUERY-BIND (&rest bind\*) &body body)
=> result

## Arguments and Values:
bind := (query-name function &key report-function interactive-function)
query-name := symbol, otherwise an implementation dependent condition.

“‘lisp
#?(query-bind (("not symbol" (lambda () :dummy))))
:signals condition
“‘
Not evaluated.

“‘lisp
#?(query-bind (((intern "Not evaluated") (lambda () :dummy))))
:signals condition
“‘
function := function, otherwise an implementation dependent condition.

“‘lisp
#?(query-bind ((name "not function")))
:signals condition
“‘

“‘lisp
#?(query-bind ((name ’no-such-function)))
:signals condition
“‘
Evaluated.

“‘lisp
#?(query-bind ((name (coerce ’list ’function))))
:invokes-debugger not
“‘
If the argument FUNCTION does not transfer control flow, EXP is returned.

“‘lisp
#?(query-bind ((name #’list))
(query-eval 0))
=> 0
“‘
report-function := function, otherwise an implementation dependent conditioin.

“‘lisp
#?(query-bind ((name #’list :report-function "not function")))
:signals condition
“‘
Evaluated.

“‘lisp
#?(query-bind ((name #’list :report-function (coerce #’print ’function)))) :invokes-debugger not
“‘
If specified such function should have API as (function (stream)).
Specified function is called to print selection report.

“‘lisp
#?(query-bind ((name (lambda () :dummy)
:report-function (lambda (s) (format s "Report"))))
(query-prompt))
:outputs "
0: [NAME] Report
> "
, :stream
“‘
When NIL (the default), selection name is printed as report.

“‘lisp
#?(query-bind ((name (lambda () :dummy)))
(query-prompt))
:outputs "
0: [NAME] NAME
> "
, :stream
“‘
interactive-function := function, otherwise an implementation dependent condition.

“‘lisp
#?(with-input-from-string (in "name")
(let ((*query-io* (make-two-way-stream in (make-broadcast-stream))))
(query-bind ((name (lambda () :dummy) :interactive-function "not function")) (query-repl))))
:signals condition
“‘
If specifed, such function should have API as (function () list).
Specifed function is called when selection is selected.

“‘lisp
#?(query-bind ((name (lambda (a) a)
:interactive-function (lambda () (list (princ :hoge)))))
(query-eval 0))
:outputs "HOGE"
“‘
If specified, such functions return value is APPLYed the first argument FUNCTION.

“‘lisp
#?(query-bind ((name #’princ :interactive-function (lambda () (list :a *standard-output*)))) (query-eval 0))
:outputs "A"
“‘
body := implicit PROGN
result := T.

## Affected By:
QUERY-REPL::*SELECTIONS*

## Side-Effects:
Modify environment i.e. QUERY-REPL::*SELECTIONS*.

## Notes:

## Exceptional-Situations:

Package

query-repl.

Source

query-repl.lisp.

Macro: query-case (query &body clauses)

# QUERY-CASE

## Description:

### syntax (QUERY-CASE query &body clauses)
=> result

## Arguments and Values:
query := Form which print query message.
clause := (name lambda-list query-param* &body body)
name := symbol, otherwise error.

“‘lisp
#?(query-case () ("not symbol" ()))
:signals error
“‘
Not evaluated.

“‘lisp
#?(query-case () ((intern "Not evaluated")))
:signals error
“‘
lambda-list := ordinary lambda list.

“‘lisp
#?(query-case () (name "not list"))
:signals error
“‘
query-param := [ :report report-form | :interactive function-name ]
report-form := [ function-name | string ]
When report-form function-name is specified, such function should have API as (function (stream)).

“‘lisp
#?(query-case () (name () :report (formatter "not function name")))
:signals error
“‘
When string is specified, treated as (lambda (s) (format s string)).

“‘lisp
#?(with-input-from-string (in "0")
(let ((*query-io* (make-two-way-stream in *query-io*)))
(query-case () (name () :report "Printed."))))
:outputs "
0: [NAME] Printed.
> "
, :stream
“‘
function-name := [ symbol | (cons (eql lambda)) ]
When interactive function is specified, such function should have API as (function () list). Returned values are applied to LAMBDA-LIST and BODY is evaluated.

“‘lisp
#?(with-input-from-string (in "0")
(let ((*query-io* (make-two-way-stream in *query-io*)))
(query-case ()
(name (a) :interactive (lambda () (list :returned))
a))))
=> :RETURNED
, :stream
“‘
body := implicit progn.
result := T

## Affected By:
QUERY-REPL::*SELECTIONS* internally.

“‘lisp
#?(with-input-from-string (in "test")
(let ((*query-io* (make-two-way-stream in *query-io*)))
(block :block
(query-bind ((test (lambda () (return-from :block :return))))
(query-case ()
(a () :a))))))
:outputs "
0: [A ] A
1: [TEST] TEST
> "
, :stream
“‘

“‘lisp
#?(with-input-from-string (in "test")
(let ((*query-io* (make-two-way-stream in *query-io*)))
(block :block
(query-bind ((test (lambda () (return-from :block :return))))
(query-case ()
(a () :a))))))
=> :RETURN
, :stream
“‘

## Side-Effects:

## Notes:

## Exceptional-Situations:

Package

query-repl.

Source

query-repl.lisp.


Previous: , Up: Public Interface   [Contents][Index]

5.1.3 Ordinary functions

Function: paged-select (list &key max key print-page)

# PAGED-SELECT

## Description:

### syntax (PAGED-SELECT list &key (max 10) (key #’identity))
=> result

## Arguments and Values:
list := list, otherwise an implementation dependent condition.

“‘lisp
#?(paged-select "not list")
:signals condition
“‘
max := (integer 3 *), otherwise an implementation dependent condition.

“‘lisp
#?(paged-select ’(1 2 3) :max 1)
:signals condition
“‘

“‘lisp
#?(paged-select ’(1 2 3) :max -1)
:signals condition
“‘

“‘lisp
#?(paged-select ’(1 2 3) :max 10.0)
:signals condition
“‘

“‘lisp
#?(paged-select ’(1 2 3) :max "not integer")
:signals condition
“‘
When specified, output selection has specified size.

“‘lisp
#?(with-input-from-string (in "1")
(let ((*query-io* (make-two-way-stream in *query-io*))) (paged-select (loop :for i :below 10 :collect i) :max 3))) :outputs "
0: [SELECT] #:NEXT
1: [SELECT] 0
2: [SELECT] 1
> "
, :stream
“‘
key := function designator, otherwise an implementation dependent condition.

“‘lisp
#?(paged-select ’(1 2 3) :key "not function")
:signals condition
“‘
If specified, each element is applied.

“‘lisp
#?(with-input-from-string (in "1")
(let ((*query-io* (make-two-way-stream in *query-io*))) (paged-select ’(1 2 3) :key #’princ-to-string)))
=> "2"
, :test
“‘
result := T

## Affected By:
Dynamic environment of QUERY-REPL::*SELECTIONS*

“‘lisp
#?(with-input-from-string (in "3")
(let ((*query-io* (make-two-way-stream in *query-io*)))
(block :block
(query-bind ((test (lambda () (return-from :block :returned)))) (paged-select ’(1 2 3))))))
=> :RETURNED
, :stream
“‘
*QUERY-EVAL*

“‘lisp
#?(with-input-from-string (in "(print :hoge) 0")
(let ((*query-io* (make-two-way-stream in (make-broadcast-stream)))) (paged-select ’(1 2 3))))
:outputs "
:HOGE "
“‘

## Side-Effects:

## Notes:
Key function is applied only printed page elements.

“‘lisp
#?(with-input-from-string (in "1")
(let ((*query-io* (make-two-way-stream in (make-broadcast-stream)))) (paged-select (loop :for i :below 20 :collect i)
:key (lambda (x) (princ x) (force-output) x)))) :outputs "012345678"
“‘
Additionaly such function is applied only once.

“‘lisp
#?(with-input-from-string (in (concatenate ’string
"0" ; <— Choose #:NEXT.
" 1" ; <— Choose #:PREV.
" 2")) ; <— Select.
(let ((*query-io* (make-two-way-stream in (make-broadcast-stream)))) (paged-select (loop :for i :below 20 :collect i)
:key (lambda (x) (princ x) (force-output) x)))) :outputs "012345678910111213141516"
“‘

## Exceptional-Situations:

Package

query-repl.

Source

query-repl.lisp.

Function: query-eval (exp)

# QUERY-EVAL

## Description:

### syntax (QUERY-EVAL exp)
=> result

## Arguments and Values:
exp := T
result := T

## Affected By:
*QUERY-EVAL*
When *QUERY-EVAL* is NIL, EXP itself is returned.

“‘lisp
#?(query-eval ’(+))
=> 0
“‘

“‘lisp
#?(let ((*query-eval*))
(query-eval ’(+)))
=> (+)
, :test
“‘
QUERY-REPL::*SELECTIONS* internal use.
When EXP is integer and can get (nth EXP QUERY-REPL::*SELECTIONS*)
such selections interactive-function is called.

“‘lisp
#?(query-bind ((test (lambda () (princ :will-printed))))
(query-eval 0))
:outputs "WILL-PRINTED"
“‘
When EXP is symbol and can get only one slection from QUERY-REPL::*SELECTION* by its name such selections interactive-function is called.

“‘lisp
#?(query-bind ((test (lambda () (princ :will-printed))))
(query-eval :test))
:outputs "WILL-PRINTED"
“‘
When EXP is symbol and some selections are selected from QUERY-REPL::*SELECTION* by name a warning is signaled.

“‘lisp
#?(query-bind ((test (lambda () (princ :never)))
(test2 (lambda () (princ :never))))
(query-eval :test))
:signals warning
“‘
In such case, (values) are returned.

“‘lisp
#?(query-bind ((test (lambda () (princ :never)))
(test2 (lambda () (princ :never))))
(query-eval :test))
:values ()
, :ignore-signals
“‘

## Side-Effects:
Refer *QUERY-EVAL*
Modify +++ ++ + /// // / *** ** *.

## Notes:

## Exceptional-Situations:

Package

query-repl.

Source

query-repl.lisp.

Function: query-prompt (&optional *standard-output*)

# QUERY-PROMPT

## Description:

### syntax (QUERY-PROMPT &optional (\*standard-output\* \*query-io\*)) => result

## Arguments and Values:
*standard-output* := Output stream, otherwise error.

“‘lisp
#?(query-prompt "not-stream")
:signals error
“‘
result := NULL

“‘lisp
#?(query-prompt)
=> NIL
, :stream
“‘

## Affected By:
*PROMPT*

“‘lisp
#?(let ((*prompt* "input>"))
(query-prompt))
:outputs "
input> "
, :stream
“‘

## Side-Effects:
Outputs to ‘STREAM‘.

## Notes:

## Exceptional-Situations:

Package

query-repl.

Source

query-repl.lisp.

Function: query-read (&optional *standard-input*)

# QUERY-READ

## Description:
Thin wrapper for CL:READ.

### syntax (QUERY-READ &optional (\*standard-input\* \*query-io\*))
=> result

## Arguments and Values:
*standard-input* := input stream, otherwise error.

“‘lisp
#?(query-read "not stream")
:signals type-error
“‘
result := Lisp form.

## Affected By:
*QUERY-EVAL* *READ-EVAL* *READ-BASE* *READ-DEFAULT-FLOAT-FORMAT* *READ-SUPPRESS* When *QUERY-EVAL* is NIL, *READ-EVAL* is set NIL automatically.

“‘lisp
#?(let ((*query-eval*))
(with-input-from-string (*query-io* "#.(+)")
(query-read)))
:signals reader-error
“‘

## Side-Effects:
Consume stream contents.

## Notes:

## Exceptional-Situations:

Package

query-repl.

Source

query-repl.lisp.

Function: query-repl ()

# QUERY-REPL

## Description:

### syntax (QUERY-REPL)
=> result

## Arguments and Values:
result := T

## Affected By:
QUERY-REPL::*SELECTIONS*

“‘lisp
#?(block :block
(query-bind ((nil (lambda () (return-from :block 0)))) (with-input-from-string (s "0")
(let ((*query-io* (make-two-way-stream s *query-io*))) (query-repl)))))
=> 0
, :stream
“‘
*QUERY-EVAL*
When *QUERY-EVAL* is NIL, and meed #. dispatch macro
warning is signaled.

“‘lisp
#?(let (*query-eval*)
(block :block
(query-bind ((nil (lambda () (return-from :block 0)))) (with-input-from-string (s "#.1")
(let ((*query-io* (make-two-way-stream s *query-io*))) (query-repl))))))
:signals warning
“‘
In such case, do next loop.

“‘lisp
#?(let (*query-eval*)
(block :block
(query-bind ((nil (lambda () (return-from :block 0)))) (with-input-from-string (s "#.1 0")
(let ((*query-io* (make-two-way-stream s *query-io*))) (query-repl))))))
=> 0
, :stream
“‘
*READ-EVAL* *READ-BASE* *READ-DEFAULT-FLOAT-FORMAT* *READ-SUPPRESS*

## Side-Effects:
io *QUERY-IO*.

## Notes:

## Exceptional-Situations:

Package

query-repl.

Source

query-repl.lisp.

Function: select (list)

# SELECT

## Description:

### syntax (SELECT list)
=> result

## Arguments and Values:
list := list, otherwise error.

“‘lisp
#?(select :atom)
:signals type-error
“‘
result := selected elt of the list.

“‘lisp
#?(with-input-from-string (in "0") ; <— select 0 th.
(let ((*query-io* (make-two-way-stream in *query-io*)))
(select ’(1 2 3))))
=> 1
, :stream
“‘

“‘lisp
#?(with-input-from-string (in "1") ; <— select 1 th.
(let ((*query-io* (make-two-way-stream in *query-io*)))
(select ’(1 2 3))))
=> 2
, :stream
“‘

## Affected By:
Dynamic environment of QUERY-REPL::*SELECTIONS*

“‘lisp
#?(with-input-from-string (in "1")
(let ((*query-io* (make-two-way-stream in *query-io*)))
(block :block
(query-bind ((test (lambda () (return-from :block :selected)))) (select ’(:never))))))
=> :SELECTED
, :stream
“‘

## Side-Effects:
Input / Output *query-io*

“‘lisp
#?(with-input-from-string (in "1")
(let ((*query-io* (make-two-way-stream in *query-io*)))
(block :block
(query-bind ((test (lambda () (return-from :block :selected)))) (select ’(:never))))))
:outputs "
0: [SELECT] :NEVER
1: [TEST ] TEST
> "
, :stream
“‘

## Notes:

## Exceptional-Situations:

Package

query-repl.

Source

query-repl.lisp.


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Special variables

Special Variable: *selections*
Package

query-repl.

Source

query-repl.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.2 Ordinary functions

Function: <make-selection-form> (clause block)

# <MAKE-SELECTION-FORM>

## Description:

### syntax (<MAKE-SELECTION-FORM> clause block)
=> result

## Arguments and Values:
clause :=
block :=
result :=

## Affected By:

## Side-Effects:

## Notes:

## Exceptional-Situations:

## Tests.

“‘lisp
#?(<make-selection-form> ’(name ()) :block)
=> (NAME (LAMBDA () (RETURN-FROM :BLOCK (PROGN)))
:REPORT-FUNCTION (LAMBDA (query-repl::S) (FORMAT query-repl::S "~A" ’NAME)) :INTERACTIVE-FUNCTION NIL)
“‘

“‘lisp
#?(<make-selection-form> ’(name () :report fun-name-as-symbol) :block)
=> (NAME (LAMBDA () (RETURN-FROM :BLOCK (PROGN)))
:REPORT-FUNCTION #’FUN-NAME-AS-SYMBOL
:INTERACTIVE-FUNCTION NIL)
“‘

“‘lisp
#?(<make-selection-form> ’(name () :report (lambda (s) (format s "hoge"))) :block) => (NAME (LAMBDA () (RETURN-FROM :BLOCK (PROGN)))
:REPORT-FUNCTION #’(LAMBDA (S) (FORMAT S "hoge"))
:INTERACTIVE-FUNCTION NIL)
“‘

“‘lisp
#?(<make-selection-form> ’(name () :report "hoge") :block)
=> (NAME (LAMBDA () (RETURN-FROM :BLOCK (PROGN)))
:REPORT-FUNCTION (LAMBDA (query-repl::S) (FORMAT query-repl::S "hoge")) :INTERACTIVE-FUNCTION NIL)
“‘

“‘lisp
#?(<make-selection-form> ’(name () :interactive (lambda () (list 0))) :block)
=> (NAME (LAMBDA () (RETURN-FROM :BLOCK (PROGN)))
:REPORT-FUNCTION (LAMBDA (QUERY-REPL::S) (FORMAT QUERY-REPL::S "~A" ’NAME)) :INTERACTIVE-FUNCTION #’(LAMBDA () (LIST 0)))
“‘

“‘lisp
#?(<make-selection-form> ’(name () :interactive) :block)
=> (NAME (LAMBDA () (RETURN-FROM :BLOCK (PROGN :INTERACTIVE)))
:REPORT-FUNCTION (LAMBDA (QUERY-REPL::S) (FORMAT QUERY-REPL::S "~A" ’NAME)) :INTERACTIVE-FUNCTION NIL)
“‘

Package

query-repl.

Source

query-repl.lisp.

Function: copy-selection (instance)
Package

query-repl.

Source

query-repl.lisp.

Function: make-selection (&key name report-function interactive-function)
Package

query-repl.

Source

query-repl.lisp.

Function: paged-prompt (print-pagep max-page index length prompt)
Package

query-repl.

Source

query-repl.lisp.

Function: parse-query-clause (clause)
Package

query-repl.

Source

query-repl.lisp.

Function: pprint-query-case (stream exp)
Package

query-repl.

Source

query-repl.lisp.

Function: pprint-query-case-clause (stream exp &rest noise)
Package

query-repl.

Source

query-repl.lisp.

Reader: selection-interactive-function (instance)
Package

query-repl.

Source

query-repl.lisp.

Target Slot

interactive-function.

Reader: selection-name (instance)
Package

query-repl.

Source

query-repl.lisp.

Target Slot

name.

Function: selection-p (object)
Package

query-repl.

Source

query-repl.lisp.

Reader: selection-report-function (instance)
Package

query-repl.

Source

query-repl.lisp.

Target Slot

report-function.


5.2.3 Structures

Structure: selection
Package

query-repl.

Source

query-repl.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: name
Type

symbol

Readers

selection-name.

Writers

This slot is read-only.

Slot: report-function
Type

function

Initform

(error "required")

Readers

selection-report-function.

Writers

This slot is read-only.

Slot: interactive-function
Type

function

Initform

(error "required")

Readers

selection-interactive-function.

Writers

This slot is read-only.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   <  
C   F   M   P   Q   S  
Index Entry  Section

<
<make-selection-form>: Private ordinary functions

C
copy-selection: Private ordinary functions

F
Function, <make-selection-form>: Private ordinary functions
Function, copy-selection: Private ordinary functions
Function, make-selection: Private ordinary functions
Function, paged-prompt: Private ordinary functions
Function, paged-select: Public ordinary functions
Function, parse-query-clause: Private ordinary functions
Function, pprint-query-case: Private ordinary functions
Function, pprint-query-case-clause: Private ordinary functions
Function, query-eval: Public ordinary functions
Function, query-prompt: Public ordinary functions
Function, query-read: Public ordinary functions
Function, query-repl: Public ordinary functions
Function, select: Public ordinary functions
Function, selection-interactive-function: Private ordinary functions
Function, selection-name: Private ordinary functions
Function, selection-p: Private ordinary functions
Function, selection-report-function: Private ordinary functions

M
Macro, query-bind: Public macros
Macro, query-case: Public macros
make-selection: Private ordinary functions

P
paged-prompt: Private ordinary functions
paged-select: Public ordinary functions
parse-query-clause: Private ordinary functions
pprint-query-case: Private ordinary functions
pprint-query-case-clause: Private ordinary functions

Q
query-bind: Public macros
query-case: Public macros
query-eval: Public ordinary functions
query-prompt: Public ordinary functions
query-read: Public ordinary functions
query-repl: Public ordinary functions

S
select: Public ordinary functions
selection-interactive-function: Private ordinary functions
selection-name: Private ordinary functions
selection-p: Private ordinary functions
selection-report-function: Private ordinary functions

Jump to:   <  
C   F   M   P   Q   S