trivial diff: SICStus compatibility in typecheck.m
Zoltan Somogyi
zs at cs.mu.OZ.AU
Thu Aug 6 12:57:33 AEST 1998
I have committed this.
compiler/typecheck.m:
Remove occurrences of the "all" binary prefix operator, since SICStus
doesn't understand them.
Zoltan.
Index: typecheck.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.244
diff -u -u -r1.244 typecheck.m
--- typecheck.m 1998/07/13 16:26:43 1.244
+++ typecheck.m 1998/08/06 04:55:05
@@ -598,9 +598,14 @@
:- mode is_head_class_constraint(in, in) is semidet.
is_head_class_constraint(HeadTypeVars, constraint(_Name, Types)) :-
- all [TVar] (
- term__contains_var_list(Types, TVar) =>
- list__member(TVar, HeadTypeVars)
+ % SICStus does not allow the following syntax
+ % all [TVar] (
+ % term__contains_var_list(Types, TVar) =>
+ % list__member(TVar, HeadTypeVars)
+ % ).
+ \+ (
+ term__contains_var_list(Types, TVar),
+ \+ list__member(TVar, HeadTypeVars)
).
% Check whether the argument types, type quantifiers, and type constraints
@@ -1278,8 +1283,14 @@
;
term__apply_rec_substitution_to_list(PredExistQTypes0,
TypeSubst, PredExistQTypes),
- all [T] (list__member(T, PredExistQTypes) =>
- type_util__var(T, _))
+ % SICStus doesn't allow the following syntax
+ % all [T] (list__member(T, PredExistQTypes) =>
+ % type_util__var(T, _))
+ \+ (
+ list__member(T, PredExistQTypes),
+ \+ type_util__var(T, _)
+ )
+
% it might make sense to also check that
% the type substitution did not bind any
% existentially typed variables to universally
@@ -3575,10 +3586,19 @@
:- mode check_satisfiability(in, in) is semidet.
check_satisfiability(Constraints, HeadTypeParams) :-
- all [C] list__member(C, Constraints) => (
- C = constraint(_ClassName, Types),
- term__contains_var_list(Types, TVar),
- not list__member(TVar, HeadTypeParams)
+ % SICStus doesn't allow the following syntax
+ % all [C] list__member(C, Constraints) => (
+ % C = constraint(_ClassName, Types),
+ % term__contains_var_list(Types, TVar),
+ % not list__member(TVar, HeadTypeParams)
+ % ).
+ \+ (
+ list__member(C, Constraints),
+ \+ (
+ C = constraint(_ClassName, Types),
+ term__contains_var_list(Types, TVar),
+ \+ list__member(TVar, HeadTypeParams)
+ )
).
%-----------------------------------------------------------------------------%
More information about the developers
mailing list