[project @ 2001-01-17 15:11:04 by simonmar]
[ghc-hetmet.git] / ghc / interpreter / type.c
index 9b60662..9ce9803 100644 (file)
@@ -9,15 +9,16 @@
  * included in the distribution.
  *
  * $RCSfile: type.c,v $
- * $Revision: 1.30 $
- * $Date: 2000/03/13 11:37:17 $
+ * $Revision: 1.36 $
+ * $Date: 2000/05/26 17:42:18 $
  * ------------------------------------------------------------------------*/
 
-#include "prelude.h"
+#include "hugsbasictypes.h"
 #include "storage.h"
 #include "connect.h"
 #include "errors.h"
 
+#include "Rts.h"       /* to make StgPtr visible in Assembler.h */
 #include "Assembler.h" /* for AsmCTypes */
 
 /*#define DEBUG_TYPES*/
@@ -800,7 +801,7 @@ Cell e; {                               /* requires polymorphism, qualified*/
         for (; nonNull(predsAre); predsAre=tl(predsAre)) {
             evs = cons(assumeEvid(hd(predsAre),typeOff),evs);
         }
-        if (!isName(h) || !isCfun(h)) {
+        /* we now _always_ do this: if (!isName(h) || !isCfun(h)) */ {
             h = applyToArgs(h,rev(evs));
         }
     }
@@ -1134,6 +1135,7 @@ List qs; {
 
             case FROMQUAL : {   Int beta = newTyvars(1);
                                 saveVarsAss();
+                               enterPendingBtyvs();
                                spCheck(l,snd(snd(q)),NIL,genQual,m,beta);
                                 enterSkolVars();
                                 fst(snd(q))
@@ -1141,7 +1143,7 @@ List qs; {
                                 shouldBe(l,fst(snd(q)),NIL,genQual,aVar,beta);
                                 typeComp(l,m,e,qs1);
                                 restoreVarsAss();
-                                doneBtyvs(l);
+                               leavePendingBtyvs();
                                 leaveSkolVars(l,typeIs,typeOff,0);
                             }
                             break;
@@ -2853,7 +2855,7 @@ Int what; {
            } else {
                dummyVar     = inventVar();
 
-               setCurrModule(modulePrelude);
+               setCurrModule(modulePrelPrim);
 
                starToStar   = simpleKind(1);