Skip to content

Commit

Permalink
Merge pull request #338 from triska/master
Browse files Browse the repository at this point in the history
also include a newline in portray_clause/1
  • Loading branch information
mthom authored Apr 12, 2020
2 parents ea5203d + f52c977 commit 9e54b14
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/prolog/lib/format.pl
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
maplist(write, Ls).

portray_clause_(Term) -->
portray_(Term), ".".
portray_(Term), ".\n".

literal(Lit) --> format_("~q", [Lit]).

Expand Down Expand Up @@ -461,18 +461,18 @@
?- nl, portray_clause([a,b,c,d]), nl.
"abcd".
?- nl, portray_clause(X), nl.
?- nl, portray_clause((f(X) :- X)), nl.
?- nl, portray_clause(X).
?- nl, portray_clause((f(X) :- X)).
?- nl, portray_clause((h :- ( a -> b; c))), nl.
?- nl, portray_clause((h :- ( a -> b; c))).
?- nl, portray_clause((h :- ( (a -> x ; y) -> b; c))), nl.
?- nl, portray_clause((h :- ( (a -> x ; y) -> b; c))).
?- nl, portray_clause((h(X) :- ( (a(X) ; y(A,B)) -> b; c))), nl.
?- nl, portray_clause((h(X) :- ( (a(X) ; y(A,B)) -> b; c))).
?- nl, portray_clause((h :- (a,d;b,c) ; (b,e;d))), nl.
?- nl, portray_clause((h :- (a,d;b,c) ; (b,e;d))).
?- nl, portray_clause((a :- b ; c ; d)), nl.
?- nl, portray_clause((a :- b ; c ; d)).
?- nl, portray_clause((h :- L = '.')).
Expand Down

0 comments on commit 9e54b14

Please sign in to comment.