Skip to content

Commit

Permalink
Merge pull request #2306 from triska/dcg_representation
Browse files Browse the repository at this point in the history
No longer use (->)//2 in library(clpb)
  • Loading branch information
mthom authored Jan 23, 2024
2 parents 3bff923 + a6ccf95 commit 44b945a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/clpb.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@
node_id(Node, ID) },
( { I0 =:= VI } ->
( { Value =:= 0 } -> { Res = Low }
; { Value =:= 1 } -> { Res = High }
; { Res = High }
)
; { I0 > VI } -> { Res = Node }
; state(G0), { get_assoc(ID, G0, Res) } -> []
Expand Down
8 changes: 4 additions & 4 deletions src/lib/dcgs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@
dcg_constr(phrase(_,_)). % extension of 7.14.9
dcg_constr(phrase(_,_,_)). % extension of 7.14.9
dcg_constr(!). % 7.14.10
dcg_constr(\+ _) :- % 7.14.11 - not (existence implementation dep.)
throw(error(representation_error(dcg_body), phrase/3)).
dcg_constr((_->_)) :- % 7.14.12 - if-then (existence implementation dep.)
throw(error(representation_error(dcg_body), phrase/3)).
dcg_constr(\+ G_0) :- % 7.14.11 - not (existence implementation def.)
throw(error(representation_error(dcg_body), [culprit- (\+ G_0)])).
dcg_constr((If->Then)) :- % 7.14.12 - if-then (existence implementation def.)
throw(error(representation_error(dcg_body), [culprit- (If->Then)])).

% The principal functor of the first argument indicates
% the construct to be expanded.
Expand Down

0 comments on commit 44b945a

Please sign in to comment.