From 08e36f1d1865cb01e3470e976a05cbf8693d4fec Mon Sep 17 00:00:00 2001 From: lewie Date: Fri, 10 Mar 2000 17:30:36 +0000 Subject: [PATCH] [project @ 2000-03-10 17:30:36 by lewie] 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 | 23 +++++++++++++++++------ ghc/interpreter/backend.h | 8 ++++---- ghc/interpreter/connect.h | 8 ++------ ghc/interpreter/prelude.h | 17 ++--------------- ghc/interpreter/storage.c | 6 ++++-- 5 files changed, 29 insertions(+), 33 deletions(-) diff --git a/ghc/includes/options.h b/ghc/includes/options.h index a5c866e..ecd8f55 100644 --- a/ghc/includes/options.h +++ b/ghc/includes/options.h @@ -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 $ * ------------------------------------------------------------------------*/ @@ -79,6 +79,21 @@ /* -------------------------------------------------------------------------- + * 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 * ------------------------------------------------------------------------*/ @@ -202,10 +217,6 @@ * 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 diff --git a/ghc/interpreter/backend.h b/ghc/interpreter/backend.h index 301184e..1f38609 100644 --- a/ghc/interpreter/backend.h +++ b/ghc/interpreter/backend.h @@ -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 */ diff --git a/ghc/interpreter/connect.h b/ghc/interpreter/connect.h index 10cf0ff..1976c9f 100644 --- a/ghc/interpreter/connect.h +++ b/ghc/interpreter/connect.h @@ -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)); diff --git a/ghc/interpreter/prelude.h b/ghc/interpreter/prelude.h index ac563b2..159aafe 100644 --- a/ghc/interpreter/prelude.h +++ b/ghc/interpreter/prelude.h @@ -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 - -/*-------------------------------------------------------------------------*/ diff --git a/ghc/interpreter/storage.c b/ghc/interpreter/storage.c index 570e501..cef2c14 100644 --- a/ghc/interpreter/storage.c +++ b/ghc/interpreter/storage.c @@ -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) ); -- 1.7.10.4