From: lewie Date: Wed, 17 May 2000 22:05:44 +0000 (+0000) Subject: [project @ 2000-05-17 22:05:44 by lewie] X-Git-Tag: Approximately_9120_patches~4440 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=04b6f89ddf84d2cad5cfe83e4b62196961ab303a;p=ghc-hetmet.git [project @ 2000-05-17 22:05:44 by lewie] Defer ambiguity test for class members, so that the test is done *after* we know the (extended) functional dependencies (this is a patch that was mostly carried over from hugs98, but a few lines were out of place). --- diff --git a/ghc/interpreter/static.c b/ghc/interpreter/static.c index 16fad26..6892f42 100644 --- a/ghc/interpreter/static.c +++ b/ghc/interpreter/static.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: static.c,v $ - * $Revision: 1.40 $ - * $Date: 2000/04/07 10:00:28 $ + * $Revision: 1.41 $ + * $Date: 2000/05/17 22:05:44 $ * ------------------------------------------------------------------------*/ #include "hugsbasictypes.h" @@ -1515,9 +1515,6 @@ Cell m; { thd3(m) = t; /* Save type */ take(cclass(c).arity,tyvars); /* Delete extra type vars */ - if (isAmbiguous(t)) { - ambigError(line,"class declaration",hd(vs),t); - } h98CheckType(line,"member type",hd(vs),t); } @@ -1527,6 +1524,10 @@ Cell m; { Int line = intOf(fst3(m)); List vs = snd3(m); Type t = thd3(m); + + if (isAmbiguous(t)) { + ambigError(line,"class declaration",hd(vs),t); + } } static Void local addMembers(c) /* Add definitions of member funs */