From: sewardj Date: Fri, 7 Apr 2000 10:00:28 +0000 (+0000) Subject: [project @ 2000-04-07 10:00:28 by sewardj] X-Git-Tag: Approximately_9120_patches~4779 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9308edd2f5c71c40c996f7dea9ac9d706db65508;p=ghc-hetmet.git [project @ 2000-04-07 10:00:28 by sewardj] Get correct line numbers in type/static error messages. --- diff --git a/ghc/interpreter/hugs.c b/ghc/interpreter/hugs.c index 8a0b745..1da17a1 100644 --- a/ghc/interpreter/hugs.c +++ b/ghc/interpreter/hugs.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: hugs.c,v $ - * $Revision: 1.61 $ - * $Date: 2000/04/06 00:01:26 $ + * $Revision: 1.62 $ + * $Date: 2000/04/07 10:00:28 $ * ------------------------------------------------------------------------*/ #include @@ -1086,23 +1086,23 @@ static void processModule ( Module m ) addUnqualImport(zfst(te2),zsnd(te2)); break; case M_TYCON: - tyconDefn(zsel14(te2),zsel24(te2),zsel34(te2),zsel44(te2)); + tyconDefn(intOf(zsel14(te2)),zsel24(te2),zsel34(te2),zsel44(te2)); break; case M_CLASS: - classDefn(zsel14(te2),zsel24(te2),zsel34(te2),zsel44(te2)); + classDefn(intOf(zsel14(te2)),zsel24(te2),zsel34(te2),zsel44(te2)); break; case M_INST: - instDefn(zfst3(te2),zsnd3(te2),zthd3(te2)); + instDefn(intOf(zfst3(te2)),zsnd3(te2),zthd3(te2)); break; case M_DEFAULT: - defaultDefn(zfst(te2),zsnd(te2)); + defaultDefn(intOf(zfst(te2)),zsnd(te2)); break; case M_FOREIGN_IM: - foreignImport(zsel15(te2),zsel25(te2),zsel35(te2), + foreignImport(intOf(zsel15(te2)),zsel25(te2),zsel35(te2), zsel45(te2),zsel55(te2)); break; case M_FOREIGN_EX: - foreignExport(zsel15(te2),zsel25(te2),zsel35(te2), + foreignExport(intOf(zsel15(te2)),zsel25(te2),zsel35(te2), zsel45(te2),zsel55(te2)); case M_VALUE: valDefns = cons(te2,valDefns); diff --git a/ghc/interpreter/static.c b/ghc/interpreter/static.c index 5859e84..16fad26 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.39 $ - * $Date: 2000/04/06 00:36:12 $ + * $Revision: 1.40 $ + * $Date: 2000/04/07 10:00:28 $ * ------------------------------------------------------------------------*/ #include "hugsbasictypes.h" @@ -3263,15 +3263,14 @@ Cell intName; Cell type; { Text t = textOf(intName); Name n = findName(t); - Int l = intOf(line); if (isNull(n)) { n = newName(t,NIL); } else if (name(n).defn!=PREDEFINED) { - ERRMSG(l) "Redeclaration of foreign \"%s\"", textToStr(t) + ERRMSG(line) "Redeclaration of foreign \"%s\"", textToStr(t) EEND; } - name(n).line = l; + name(n).line = line; name(n).defn = extName; name(n).type = type; name(n).callconv = callconv; @@ -3301,15 +3300,14 @@ Cell intName; Cell type; { Text t = textOf(intName); Name n = findName(t); - Int l = intOf(line); if (isNull(n)) { n = newName(t,NIL); } else if (name(n).defn!=PREDEFINED) { - ERRMSG(l) "Redeclaration of foreign \"%s\"", textToStr(t) + ERRMSG(line) "Redeclaration of foreign \"%s\"", textToStr(t) EEND; } - name(n).line = l; + name(n).line = line; name(n).defn = NIL; /* nothing to say */ name(n).type = type; name(n).callconv = callconv;