]> Repositorios git - scryer-prolog.git/commit
use round brackets for goals involving operators
authorMarkus Triska <[email protected]>
Tue, 17 Dec 2024 21:51:47 +0000 (22:51 +0100)
committerMarkus Triska <[email protected]>
Tue, 17 Dec 2024 21:51:47 +0000 (22:51 +0100)
commit8dc80b815fa72da5dad86777447c374ef1350c20
treec9fb5fbf16b090302a3ded389d4e4e94fbe741fb
parent6175e334a5785f739ff0378d3251f83d97fd7992
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.
src/lib/format.pl