[project @ 2000-03-10 14:53:00 by sewardj]
[ghc-hetmet.git] / ghc / interpreter / type.c
index 645ffb5..7e5c4d2 100644 (file)
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: type.c,v $
- * $Revision: 1.25 $
- * $Date: 2000/03/06 10:12:57 $
+ * $Revision: 1.28 $
+ * $Date: 2000/03/10 14:53:00 $
  * ------------------------------------------------------------------------*/
 
 #include "prelude.h"
@@ -725,12 +725,10 @@ Cell e; {
         case LAZYPAT    : snd(e) = typeExpr(l,snd(e));
                           break;
 
-#if NPLUSK
         case ADDPAT     : {   Int alpha = newTyvars(1);
                               inferType(typeVarToVar,alpha);
                               return ap(e,assumeEvid(predIntegral,alpha));
                           }
-#endif
 
         default         : internal("typeExpr");
    }
@@ -1963,6 +1961,7 @@ Inst in; {                              /* member functions for instance in*/
     /* Invent a GHC-compatible name for the instance decl */
     {
        char buf[FILENAME_MAX+1];
+       char buf2[10];
        Int           i, j;
        String        str;
        Cell          qq      = inst(in).head;
@@ -1989,7 +1988,9 @@ Inst in; {                              /* member functions for instance in*/
           switch (whatIs(qq)) {
              case TYCON:  str = textToStr(tycon(qq).text); break;
              case TUPLE:  str = textToStr(ghcTupleText(qq)); break;
-             case OFFSET: sprintf(str,"%d",offsetOf(qq)); break;
+             case OFFSET: sprintf(buf2,"%d",offsetOf(qq)); 
+                          str = buf2;
+                          break;
              default: internal("typeInstDefn: making GHC name"); break;
           }
           for (j = 0; i<FILENAME_MAX && str[j]!='\0'; i++, j++) {