Markus Triska
8dc80b815f
use round brackets for goals involving operators
...
Examples:
?- portray_clause(((+) :- a=b,(-))).
(+) :-
a=b,
(-).
true.
?- portray_clause((a :- (b :- c))).
a :-
(b:-c).
true.
This addresses #2715 .
Currently, more round brackets than needed are emitted. Ideally, a
better approach to solve the issue here and also in toplevel.pl is
found in the future.
2024-12-17 22:51:47 +01:00
Markus Triska
6175e334a5
prevent accidental amalgamation of graphic token chars in output
...
This addresses #2713 . Many thanks to @notoria for reporting this
excellent case!
Example:
?- portray_clause(A = @).
A= @ .
true.
At other positions the now inserted space is unnecessary, as in:
?- portray_clause((head:- @,b)).
head :-
@ ,
b.
true.
The toplevel has a similar issue:
?- C = # ; false.
C = # |<-- cursor is here; redundant space after #
There may be a way to solve this issue for all cases like this.
2024-12-17 20:06:52 +01:00
Mark Thom
7e22c12a8d
Merge pull request #2582 from bakaq/rework_library_interface
...
Rework library interface
2024-12-13 21:46:43 -07:00
Mark Thom
c59f54252c
Merge pull request #2683 from ffortier/master
...
Support hermetic build environment
2024-12-13 21:39:12 -07:00
Mark Thom
a9a77779e3
Merge pull request #2689 from triska/weighted_maybe
...
introduce and use weighted_maybe/2
2024-12-13 21:38:47 -07:00
Mark Thom
5f035ec6ad
Merge pull request #2690 from notoria/next
...
Add '$random_integer'/3
2024-12-13 21:38:32 -07:00
Mark Thom
9eef380764
Merge pull request #2696 from jasonhemann/patch-3
...
s/performance characters/performance characteristics/
2024-12-13 21:37:56 -07:00
Mark Thom
ce6a0a1541
Merge pull request #2698 from jasonhemann/patch-5
...
Documentation for read/2
2024-12-13 20:02:50 -07:00
Mark Thom
b919a39b96
Merge pull request #2703 from jasonhemann/patch-6
...
s/avaibale/available/
2024-12-13 20:02:21 -07:00
Jason Hemann
a15b2789e2
s/avaibale/available/
...
Quick typo fix to docs.
2024-12-13 13:41:05 -05:00
bakaq
2e910de485
cargo fmt
2024-12-12 06:03:43 -03:00
bakaq
74e3d32ca9
Use Cow<'a,B> for toplevel configuration
2024-12-12 05:59:59 -03:00
bakaq
500a6cdaf1
FIXME in Drop for QueryState
2024-12-12 05:49:52 -03:00
bakaq
17293a5753
Leave residual goals for later
2024-12-12 05:47:01 -03:00
bakaq
a75266c3ce
Derive Default for StreamConfig
2024-12-12 05:47:01 -03:00
bakaq
a92eac919f
Rename lib_machine_tests.rs to tests.rs
2024-12-12 05:46:54 -03:00
Jason Hemann
2ff50f06bc
Update builtins.pl
...
s/compund/compound/
2024-12-11 08:05:03 -05:00
Jason Hemann
e219e1c483
Update builtins.pl
...
Simplifying docstring.
2024-12-11 05:46:28 -05:00
Jason Hemann
eef9f74a68
Documentation for read/2
...
Mirrored the wording in the docstrings for `read/1` and `read_term/3`.
2024-12-10 21:18:09 -05:00
Jason Hemann
eae1f53846
"bound to an atom"
...
Quick typo.
2024-12-10 21:07:48 -05:00
Jason Hemann
48a42ae140
s/performance characters/performance characteristics/
...
Small typo fix in docs.
2024-12-10 20:56:44 -05:00
bakaq
9265d66f58
Handle errors in QueryState
2024-12-08 20:18:06 -03:00
bakaq
3d3baeed82
Migrate benches
2024-12-08 20:18:06 -03:00
bakaq
e21c772181
Migrate tests to new API
2024-12-08 20:18:06 -03:00
bakaq
2f82c78bc0
Separate lib_machine tests into separate file
2024-12-08 20:18:06 -03:00
bakaq
ec6286ffab
Shrink MVP API surface
2024-12-08 20:18:06 -03:00
bakaq
bb5adba4ef
Rename PrologTerm to Term
2024-12-08 20:18:06 -03:00
bakaq
33d8abfed8
Remove parsed_results.rs
2024-12-08 20:18:06 -03:00
bakaq
d336cbc86a
MachineBuilder
2024-12-08 20:18:06 -03:00
bakaq
79fbd9e90f
Fix Machine links
2024-12-08 20:18:06 -03:00
bakaq
cab61738ad
#[deny(missing_docs)]
2024-12-08 20:18:06 -03:00
bakaq
e6cc408ff2
Document test methods
2024-12-08 20:18:06 -03:00
bakaq
dc8348b843
Add interfaces for QueryState methods
2024-12-08 20:18:06 -03:00
bakaq
cb040dafc1
Docs for Machine and QueryState
2024-12-08 20:18:06 -03:00
bakaq
c13fc2d1b6
Docs for run_binary()
2024-12-08 20:18:06 -03:00
bakaq
1375f448a0
LeafAnswer docs and success checking methods
2024-12-08 20:18:06 -03:00
bakaq
0433706db6
More PrologTerm documentation
2024-12-08 20:18:06 -03:00
bakaq
e74fd11b0d
Conjunctions, disjunction, and LeafAnswer to PrologTerm
2024-12-08 20:18:06 -03:00
bakaq
4480e7c066
Associated functions for creating PrologTerm
2024-12-08 20:18:06 -03:00
bakaq
71dec62ce2
Basic docs and non_exhaustive for PrologTerm
2024-12-08 20:18:05 -03:00
bakaq
658e39aae6
Machine and stream config rework
2024-12-08 20:18:05 -03:00
bakaq
29fc55cb28
Rename LeafAnswer
2024-12-08 20:18:05 -03:00
bakaq
8e7dc9dba8
Rename PrologTerm
2024-12-08 20:18:05 -03:00
Markus Triska
abe1f37167
introduce and use weighted_maybe/2
...
Many thanks to @hurufu for the very nice definition!
This is until library(random) provides this functionality,
and a good name is found for it. See #2670 .
2024-12-08 21:33:03 +01:00
notoria
8cde3f8ce3
Add '$random_integer'/3
2024-12-08 20:00:00 +01:00
Mark Thom
dba9c9a0a7
instantiate module resolutions for meta-predicate lookups when expanding calls ( #2255 , #2619 , #2684 )
2024-12-06 23:30:36 -08:00
Mark Thom
ea02b54e7f
Merge pull request #2677 from jasagredo/js/get-single-char-windows
...
Ignore `KeyEventKind::Release` events when reading a char
2024-12-05 20:25:25 -07:00
Francis Fortier
c1571bf063
export toplevel repl/0
2024-12-05 09:38:38 -05:00
Jason Hemann
d7bf7445f1
s/red/read/ typo in documentation.
...
Small quick fix.
2024-12-05 01:19:51 -05:00
Javier Sagredo
8e5ddebddb
Ignore KeyEventKind::Release events when reading a char
2024-12-04 00:05:10 +01:00