[project @ 2000-01-11 15:40:57 by sewardj]
authorsewardj <unknown>
Tue, 11 Jan 2000 15:40:57 +0000 (15:40 +0000)
committersewardj <unknown>
Tue, 11 Jan 2000 15:40:57 +0000 (15:40 +0000)
Supply correct kinds for tycons created by addWiredInBoxingTycon().

ghc/interpreter/link.c
ghc/interpreter/storage.c
ghc/interpreter/storage.h

index 57c552d..3444cd4 100644 (file)
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: link.c,v $
- * $Revision: 1.32 $
- * $Date: 2000/01/11 14:21:43 $
+ * $Revision: 1.33 $
+ * $Date: 2000/01/11 15:40:57 $
  * ------------------------------------------------------------------------*/
 
 #include "prelude.h"
@@ -532,16 +532,16 @@ Int what; {
                module(modulePrelude).objectExtraNames 
                   = singleton(findText("libHS_cbits"));
 
-               nameMkC = addWiredInBoxingTycon("PrelBase","Char",  "C#",1,0,CHAR_REP  );
-               nameMkI = addWiredInBoxingTycon("PrelBase","Int",   "I#",1,0,INT_REP   );
-               nameMkW = addWiredInBoxingTycon("PrelAddr","Word",  "W#",1,0,WORD_REP  );
-               nameMkA = addWiredInBoxingTycon("PrelAddr","Addr",  "A#",1,0,ADDR_REP  );
-               nameMkF = addWiredInBoxingTycon("PrelFloat","Float", "F#",1,0,FLOAT_REP );
-               nameMkD = addWiredInBoxingTycon("PrelFloat","Double","D#",1,0,DOUBLE_REP);
+               nameMkC = addWiredInBoxingTycon("PrelBase", "Char",  "C#",CHAR_REP,   STAR );
+               nameMkI = addWiredInBoxingTycon("PrelBase", "Int",   "I#",INT_REP,    STAR );
+               nameMkW = addWiredInBoxingTycon("PrelAddr", "Word",  "W#",WORD_REP,   STAR );
+               nameMkA = addWiredInBoxingTycon("PrelAddr", "Addr",  "A#",ADDR_REP,   STAR );
+               nameMkF = addWiredInBoxingTycon("PrelFloat","Float", "F#",FLOAT_REP,  STAR );
+               nameMkD = addWiredInBoxingTycon("PrelFloat","Double","D#",DOUBLE_REP, STAR );
                nameMkInteger            
-                       = addWiredInBoxingTycon("PrelNum","Integer","Integer#",1,0,0);
+                       = addWiredInBoxingTycon("PrelNum","Integer","Integer#",0 ,STAR );
                nameMkPrimByteArray      
-                       = addWiredInBoxingTycon("PrelGHC","ByteArray","PrimByteArray#",1,0,0);
+                       = addWiredInBoxingTycon("PrelGHC","ByteArray","PrimByteArray#",0 ,STAR );
 
                for (i=0; i<NUM_TUPLES; ++i) {
                    addTupleTycon(i);
index 9fa88dd..4856021 100644 (file)
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: storage.c,v $
- * $Revision: 1.37 $
- * $Date: 2000/01/11 14:51:43 $
+ * $Revision: 1.38 $
+ * $Date: 2000/01/11 15:40:57 $
  * ------------------------------------------------------------------------*/
 
 #include "prelude.h"
@@ -779,24 +779,25 @@ Module findFakeModule ( Text t )
 
 Name addWiredInBoxingTycon
         ( String modNm, String typeNm, String constrNm,
-          Int arity, Int no, Int rep )
+          Int rep, Kind kind )
 {
-   Name  n;
-   Tycon t;
-   Text modT  = findText(modNm);
-   Text typeT = findText(typeNm);
-   Text conT  = findText(constrNm);
-   Module m = findFakeModule(modT);
+   Name   n;
+   Tycon  t;
+   Text   modT  = findText(modNm);
+   Text   typeT = findText(typeNm);
+   Text   conT  = findText(constrNm);
+   Module m     = findFakeModule(modT);
    setCurrModule(m);
    
    n = newName(conT,NIL);
-   name(n).arity = arity;
-   name(n).number = cfunNo(no);
-   name(n).type = NIL;
+   name(n).arity  = 1;
+   name(n).number = cfunNo(0);
+   name(n).type   = NIL;
    name(n).primop = (void*)rep;
 
    t = newTycon(typeT);
    tycon(t).what = DATATYPE;
+   tycon(t).kind = kind;
    return n;
 }
 
index 16d8523..df74320 100644 (file)
@@ -10,8 +10,8 @@
  * included in the distribution.
  *
  * $RCSfile: storage.h,v $
- * $Revision: 1.24 $
- * $Date: 2000/01/05 13:53:37 $
+ * $Revision: 1.25 $
+ * $Date: 2000/01/11 15:40:57 $
  * ------------------------------------------------------------------------*/
 
 /* --------------------------------------------------------------------------
@@ -461,7 +461,7 @@ extern Module findFakeModule ( Text t );
 extern Tycon addTupleTycon ( Int n );
 extern Name addWiredInBoxingTycon
                ( String modNm, String typeNm, String constrNm,
-                 Int arity, Int no, Int rep );
+                 Int rep, Kind kind );
 Tycon addWiredInEnumTycon ( String modNm, String typeNm, 
                             List /*of Text*/ constrs );