Auxiliary Code for User Interaction
Author(s): Ciao Development Team.Usage and interface
- Library usage:
:- use_module(ciaobld(interactive_aux)). - Exports:
- Predicates:
ask_option_value/6, ask_yesno/1.
- Predicates:
- Imports:
- System library modules:
messages, strings. - Packages:
prelude, nonpure, condcomp, assertions, basicmodes, dcg, fsyntax, hiord.
- System library modules:
Documentation on exports
PREDICATE
Usage:ask_option_value(Description,Name,ValidValues,DefaultValue,PreviousValue,Value)
Ask (interactively) for a value for variable Name. Repeat until the user provides one of the ValidValues, or chose PreviousValue if none was provided.
- Call and exit should be compatible with:
(basic_props:string/1)Description is a string (a list of character codes).
(basic_props:atm/1)Name is an atom.
(basic_props:list/2)ValidValues is a list of terms.
(basic_props:term/1)DefaultValue is any term.
(basic_props:term/1)PreviousValue is any term.
(basic_props:term/1)Value is any term. - The following properties should hold at call time:
(term_typing:nonvar/1)Description is currently a term which is not a free variable.
(term_typing:nonvar/1)Name is currently a term which is not a free variable.
(term_typing:nonvar/1)ValidValues is currently a term which is not a free variable.
(term_typing:nonvar/1)DefaultValue is currently a term which is not a free variable.
(term_typing:nonvar/1)PreviousValue is currently a term which is not a free variable.
(term_typing:var/1)Value is a free variable.