Skip to content

Commit

Permalink
Fix compilation errors in samples, extras and benchmarks.
Browse files Browse the repository at this point in the history
benchmarks/progs/quicksort/qs_always_par.m:
benchmarks/progs/quicksort/qs_utils.m:
extras/moose/check.m:
extras/posix/samples/mdprof_cgid.m:
extras/xml/parsing.m:
samples/muz/zparser.m:
samples/muz/ztype_op.m:
    As above -- the compiler now rejects determinism declarations on
    non-predmode predicate declarations.

    Replace a call to bitmap.new with bitmap.init.
  • Loading branch information
opturion-jfischer committed Jan 13, 2016
1 parent 3db20e4 commit 2dc59fe
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion benchmarks/progs/quicksort/qs_always_par.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
quicksort(Input, Sorted),
sink_output(Sorted, !IO).

:- pred quicksort(list(string), list(string)) is det.
:- pred quicksort(list(string), list(string)).
:- mode quicksort(in, out) is det.
:- mode quicksort(list_skel_di, list_skel_uo) is det.

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/progs/quicksort/qs_utils.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:- mode list_skel_di == list_skel_unique >> dead.
:- mode list_skel_uo == free >> list_skel_unique.

:- pred partition(string, list(string), list(string), list(string)) is det.
:- pred partition(string, list(string), list(string), list(string)).
:- mode partition(in, in, out, out) is det.
:- mode partition(in, list_skel_di, list_skel_uo, list_skel_uo) is det.

Expand Down
3 changes: 1 addition & 2 deletions extras/moose/check.m
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ not contains(Decls, NonTermId)

%------------------------------------------------------------------------------%

:- pred id(nonterminal, name, arity) is det.
:- mode id(in, out, out) is det.
:- pred id(nonterminal::in, name::out, arity::out) is det.

id(Name/Arity, Name, Arity).
id(start, _, _) :-
Expand Down
2 changes: 1 addition & 1 deletion extras/posix/samples/mdprof_cgid.m
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@

handle_conn(Data, ConnFd, !IO) :-
TextSize = 1024,
Text0 = bitmap.new(TextSize * bits_per_int),
Text0 = bitmap.init(TextSize * bits_per_int),
read(ConnFd, TextSize, ReadResult, Text0, Text, !IO),
(
ReadResult = ok(Length),
Expand Down
3 changes: 1 addition & 2 deletions extras/xml/parsing.m
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,7 @@ Parser then (pred(Xs0::in, pdi, puo) is det -->
return(Xs)
).

:- pred filter1(list(opt(T)), list(T)) is det.
:- mode filter1(in, out) is det.
:- pred filter1(list(opt(T))::in, list(T)::out) is det.

filter1([], []).
filter1([X0|Xs0], Xs) :-
Expand Down
2 changes: 1 addition & 1 deletion samples/muz/zparser.m
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@
log_pred3(P) -->
c(C), parse_left(x(zAND), basic_pred, lbpred(C, conjunction), P).

:- pred lbpred(zcontext, lconn, zpred, zpred, zpred) is det.
:- pred lbpred(zcontext, lconn, zpred, zpred, zpred).
:- mode lbpred(in, in, in, in, out) is det.
lbpred(C, T, P0, P1, lbpred(T, P0, P1)-C).

Expand Down
4 changes: 2 additions & 2 deletions samples/muz/ztype_op.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

:- type powerResult ---> yes ; no(ztype).

:- pred powerType(expr, ztype, ztype, powerResult, subst, subst) is det.
:- pred powerType(expr, ztype, ztype, powerResult, subst, subst).
:- mode powerType(in, in, out, out, in, out) is det.

:- pred powerType(ztype::in, ztype::out, maybe0::out) is det.
Expand Down Expand Up @@ -90,7 +90,7 @@

:- type unify ---> unified ; failed(subst).

:- pred ztunify(ztype, ztype, ztype, unify, subst, subst) is det.
:- pred ztunify(ztype, ztype, ztype, unify, subst, subst).
:- mode ztunify(in, in, out, out, in, out) is det.

% :- pred ztunify(ztype, ztype, ztype, subst, subst) is semidet.
Expand Down

0 comments on commit 2dc59fe

Please sign in to comment.