[m-dev.] trivial diff: use implication in typecheck
David Glen JEFFERY
dgj at cs.mu.OZ.AU
Tue Sep 5 14:05:01 AEDT 2000
Estimated hours taken: 0.1
compiler/typecheck.m:
Change some code to use universal quantification and implication
rather than a less inteligible series of negations and
implicit existential quantifications. (This code was previously
commented out because SICStus wouldn't accept it).
Index: compiler/typecheck.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/typecheck.m,v
retrieving revision 1.279
diff -u -t -r1.279 typecheck.m
--- compiler/typecheck.m 2000/09/16 00:08:04 1.279
+++ compiler/typecheck.m 2000/08/23 07:48:22
@@ -445,7 +445,7 @@
PredInfo4),
%
- % Split the inferred type class constraints into those that
+ % Split the inferred type class constraints into those
% that apply only to the head variables, and those that
% apply to type variables which occur only in the body.
%
@@ -4227,19 +4227,10 @@
:- mode check_satisfiability(in, in) is semidet.
check_satisfiability(Constraints, 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)
- )
+ all [C] list__member(C, Constraints) => (
+ C = constraint(_ClassName, Types),
+ term__contains_var_list(Types, TVar),
+ not list__member(TVar, HeadTypeParams)
).
%-----------------------------------------------------------------------------%
dgj
--
David Jeffery (dgj at cs.mu.oz.au) | If your thesis is utterly vacuous
PhD student, | Use first-order predicate calculus.
Dept. of Comp. Sci. & Soft. Eng.| With sufficient formality
The University of Melbourne | The sheerist banality
Australia | Will be hailed by the critics: "Miraculous!"
| -- Anon.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list