1.0.13
1.0.13 (2021-03-28)
This release introduces support for creating simple command-line interfaces. The SWI-Prolog standard library includes a module called optparse
, but is relatively complex and performs many exponential checks. Also, the here included support library is intended to be decomposed into reusable parts (e.g., calculating width-delimited text is part of string_ext
). The command-line interface support is only an initial version currently, but the intention is to extended this over time.
Here follows the full list of changes:
call_ext
- Renamed
call_bool/2
tocall_boolean/2
. This is more consistent with the name of the Prolog typeboolean
.
cli, cli_arguments, cli_help, cli_version
- Added a new module that makes it easy to write CLI tools.
dcg
-
Added
dcg_char//1
for parsing/generating one single character. -
Renamed
dcg_bool//1
todcg_pp_boolean//1
. This is more consistent with the name of the Prolog typeboolean
, and indicates the pretty-print purpose better. -
Added
dcg_boolean//1
for parsing/generating Boolean values. -
Added
dcg_peek//1
which can be useful for simple debugging.
dict
- Fixed instantiation
(-, +, ?)
of predicatedict_get/3
.
print_ext
- Renamed
call_print_bool/1
tocall_print_boolean/1
and renamedprint_bool/1
toprint_boolean/1
. These are more consistent with the name of the Prolog typeboolean
.
rest-server
- Removed
http_server_init/1
. It is better to use the SWI-Prolog standard library predicates for initialization an HTTP server instead.
string_ext
-
Added
max_string_length/2
for calculating the length of the longest given string. -
Added
message_lines/3
andwords_lines/[3,4]
for generating width-delimited displays of text.