[project @ 2000-03-10 17:30:36 by lewie]
authorlewie <unknown>
Fri, 10 Mar 2000 17:30:36 +0000 (17:30 +0000)
committerlewie <unknown>
Fri, 10 Mar 2000 17:30:36 +0000 (17:30 +0000)
First stab at reviving TREX - just fixing some header wibbles.  Also one small
fix to get implicit parameters working (`textOf' needed to be taught that
IPCELLs are also OK).  Moved #defines for TREX, IPARAM, etc, into options.h
(in their previous location at the end of prelude.h, they were being defined
too late).

ghc/includes/options.h
ghc/interpreter/backend.h
ghc/interpreter/connect.h
ghc/interpreter/prelude.h
ghc/interpreter/storage.c

index a5c866e..ecd8f55 100644 (file)
@@ -7,8 +7,8 @@
  * Hugs version 1.4, December 1997
  *
  * $RCSfile: options.h,v $
- * $Revision: 1.20 $
- * $Date: 2000/03/10 14:53:00 $
+ * $Revision: 1.21 $
+ * $Date: 2000/03/10 17:30:36 $
  * ------------------------------------------------------------------------*/
 
 
 
 
 /* --------------------------------------------------------------------------
+ * Language extensions
+ * ------------------------------------------------------------------------*/
+
+/* Define if T-REX; Typed Rows and EXtension should be enabled             */
+/* Doesn't work in current system - I don't know what the primops do       */
+#define TREX           0
+
+/* Implicit Parameters                                                    */
+#define IPARAM         1
+
+/* Multi-instance resolution                                              */
+#define MULTI_INST     0
+
+
+/* --------------------------------------------------------------------------
  * Various table sizes
  * ------------------------------------------------------------------------*/
 
  * Fancy features
  * ------------------------------------------------------------------------*/
 
-/* Define if T-REX; Typed Rows and EXtension should be enabled             */
-/* Doesn't work in current system - I don't know what the primops do       */
-#define TREX 0
-
 /* Define if :xplain should be enabled                                    */
 #define EXPLAIN_INSTANCE_RESOLUTION 0
 
index 301184e..1f38609 100644 (file)
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: backend.h,v $
- * $Revision: 1.7 $
- * $Date: 2000/03/10 14:53:00 $
+ * $Revision: 1.8 $
+ * $Date: 2000/03/10 17:30:36 $
  * ------------------------------------------------------------------------*/
 
 /* --------------------------------------------------------------------------
@@ -151,8 +151,8 @@ extern  Void   implementTagToCon Args((Tycon));
 extern  Void   implementPrim     Args((Name));
 extern  Void   implementTuple    Args((Int));
 #if TREX                         
-extern  Name   implementRecShw   Args((Text));
-extern  Name   implementRecEq    Args((Text));
+extern  Name   implementRecShw   Args((Text,Cell));
+extern  Name   implementRecEq    Args((Text,Cell));
 #endif
 
 /* Association list storing globals assigned to dictionaries, tuples, etc */
index 10cf0ff..1976c9f 100644 (file)
@@ -8,8 +8,8 @@
  * included in the distribution.
  *
  * $RCSfile: connect.h,v $
- * $Revision: 1.25 $
- * $Date: 2000/03/10 14:53:00 $
+ * $Revision: 1.26 $
+ * $Date: 2000/03/10 17:30:36 $
  * ------------------------------------------------------------------------*/
 
 /* --------------------------------------------------------------------------
@@ -274,10 +274,6 @@ extern  Int    discrArity       Args((Cell));
 
 extern  Addr   codeGen          Args((Name,Int,Cell));
 extern  Void   implementCfun    Args((Name,List));
-#if TREX
-extern  Name   implementRecShw  Args((Text,Cell));
-extern  Name   implementRecEq   Args((Text,Cell));
-#endif
 extern  Void   addCfunTable     Args((Tycon));
 extern  Name   succCfun         Args((Name));
 extern  Name   nextCfun         Args((Name,Name));
index ac563b2..159aafe 100644 (file)
@@ -10,8 +10,8 @@
  * included in the distribution.
  *
  * $RCSfile: prelude.h,v $
- * $Revision: 1.6 $
- * $Date: 1999/10/20 02:16:04 $
+ * $Revision: 1.7 $
+ * $Date: 2000/03/10 17:30:36 $
  * ------------------------------------------------------------------------*/
 
 #define NON_POSIX_SOURCE
@@ -338,16 +338,3 @@ extern Void   hugsPutc              Args((int, FILE*));
 #define Putc                 putc
 
 #endif
-
-/*-------------------------------------------------------------------------*/
-/* AJG: This needs moved to a more appropreate location
- *
- *   TREX          to include support for Typed Rows and EXtensions.
- *   IPARAM        to include support for Implicit Parameters.
- *   MULTI_INST            to include support for Multi-Instance Resolution.
- */
-#define TREX           0
-#define IPARAM         0
-#define MULTI_INST     0
-
-/*-------------------------------------------------------------------------*/
index 570e501..cef2c14 100644 (file)
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: storage.c,v $
- * $Revision: 1.48 $
- * $Date: 2000/03/10 14:53:00 $
+ * $Revision: 1.49 $
+ * $Date: 2000/03/10 17:30:36 $
  * ------------------------------------------------------------------------*/
 
 #include "prelude.h"
@@ -413,6 +413,8 @@ Text textOf ( Cell c )
            || whatIs(c)==CONOPCELL
            || whatIs(c)==STRCELL
            || whatIs(c)==DICTVAR
+           || whatIs(c)==IPCELL
+           || whatIs(c)==IPVAR
           );
    if (!ok) {
       fprintf(stderr, "\ntextOf: bad tag %d\n",whatIs(c) );