Skip to content

Commit

Permalink
Style updates for benchmarks and samples.
Browse files Browse the repository at this point in the history
  • Loading branch information
juliensf committed May 20, 2020
1 parent 4277af0 commit f5fdc98
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion benchmarks/progs/quicksort/qs_utils.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:- import_module list.
:- import_module string.

:- inst list_skel_unique == unique(
:- inst list_skel_unique for list/1 == unique(
[] ;
[ground | list_skel_unique]
).
Expand Down
12 changes: 6 additions & 6 deletions benchmarks/progs/tree234/tree234x.m
Original file line number Diff line number Diff line change
Expand Up @@ -725,32 +725,32 @@
%------------------------------------------------------------------------------%
%------------------------------------------------------------------------------%

:- inst two(K, V, T) ==
:- inst two(K, V, T) for tree234x/2 ==
bound(
two(K, V, T, T)
).

:- inst uniq_two(K, V, T) ==
:- inst uniq_two(K, V, T) for tree234x/2 ==
unique(
two(K, V, T, T)
).

:- inst three(K, V, T) ==
:- inst three(K, V, T) for tree234x/2 ==
bound(
three(K, V, K, V, T, T, T)
).

:- inst uniq_three(K, V, T) ==
:- inst uniq_three(K, V, T) for tree234x/2 ==
unique(
three(K, V, K, V, T, T, T)
).

:- inst four(K, V, T) ==
:- inst four(K, V, T) for tree234x/2 ==
bound(
four(K, V, K, V, K, V, T, T, T, T)
).

:- inst uniq_four(K, V, T) ==
:- inst uniq_four(K, V, T) for tree234x/2 ==
unique(
four(K, V, K, V, K, V, T, T, T, T)
).
Expand Down
4 changes: 2 additions & 2 deletions samples/calculator.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
;
Res = ok(Line0),
list.delete_all(Line0, ' ', Line),
( fullexpr(X, Line, []) ->
( if fullexpr(X, Line, []) then
Num = evalexpr(X),
io.write_int(Num, !IO),
io.write_string("\n", !IO)
;
else
io.write_string("Syntax error\n", !IO)
),
main(!IO) % recursively call ourself for the next line(s)
Expand Down
2 changes: 1 addition & 1 deletion samples/e.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
---> [int | int_stream]
; closure((func) = int_stream).

:- inst int_stream ==
:- inst int_stream for int_stream/0 ==
bound([ground | int_stream] ; closure((func) = is_out is det)).

:- mode is_in == in(int_stream).
Expand Down
2 changes: 1 addition & 1 deletion samples/interpreter.m
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ not var_occurs_in_term(VarX, SubstBindingOfY, !.VarSet),
unify_term_pairs(ArgTermsX, ArgTermsY, !VarSet)
).

:- inst term_functor
:- inst term_functor for term/1
---> functor(ground, ground, ground).

% Unify a variable with a term that is known to be a functor
Expand Down

0 comments on commit f5fdc98

Please sign in to comment.