From ec0381bfc2b53bf33c76388ef143e76c89b53a83 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 28 Mar 2000 10:20:56 +0000 Subject: [PATCH] [project @ 2000-03-28 10:20:55 by andy] Restoring Hugs ability to accept the -98/+98 and -h options. --- ghc/interpreter/hugs.c | 10 ++++++---- ghc/interpreter/storage.h | 5 ++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ghc/interpreter/hugs.c b/ghc/interpreter/hugs.c index c27ec7c..93a491b 100644 --- a/ghc/interpreter/hugs.c +++ b/ghc/interpreter/hugs.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: hugs.c,v $ - * $Revision: 1.49 $ - * $Date: 2000/03/24 14:32:03 $ + * $Revision: 1.50 $ + * $Date: 2000/03/28 10:20:55 $ * ------------------------------------------------------------------------*/ #include @@ -29,6 +29,7 @@ #include "Assembler.h" /* DEBUG_LoadSymbols */ Bool haskell98 = TRUE; /* TRUE => Haskell 98 compatibility*/ +Bool initDone = FALSE; #if EXPLAIN_INSTANCE_RESOLUTION Bool showInstRes = FALSE; @@ -284,6 +285,7 @@ String argv[]; { " combined mode\n\n" ); } + initDone = TRUE; return initialModules; } @@ -515,7 +517,7 @@ String s; { /* return FALSE if none found. */ } default : if (strcmp("98",s)==0) { - if (heapBuilt() && ((state && !haskell98) || + if (initDone && ((state && !haskell98) || (!state && haskell98))) { FPrintf(stderr, "Haskell 98 compatibility cannot be changed" @@ -540,7 +542,7 @@ String s; { hpSize = MINIMUMHEAP; else if (MAXIMUMHEAP && hpSize > MAXIMUMHEAP) hpSize = MAXIMUMHEAP; - if (heapBuilt() && hpSize != heapSize) { + if (initDone && hpSize != heapSize) { /* ToDo: should this use a message box in winhugs? */ #if USE_REGISTRY FPrintf(stderr,"Change to heap size will not take effect until you rerun Hugs\n"); diff --git a/ghc/interpreter/storage.h b/ghc/interpreter/storage.h index 747cbee..d0013f6 100644 --- a/ghc/interpreter/storage.h +++ b/ghc/interpreter/storage.h @@ -10,8 +10,8 @@ * included in the distribution. * * $RCSfile: storage.h,v $ - * $Revision: 1.36 $ - * $Date: 2000/03/23 14:54:21 $ + * $Revision: 1.37 $ + * $Date: 2000/03/28 10:20:56 $ * ------------------------------------------------------------------------*/ #define DEBUG_STORAGE @@ -146,7 +146,6 @@ extern Syntax syntaxOf ( Text ); * ------------------------------------------------------------------------*/ #define heapAlloc(s) (Heap)(farCalloc(s,sizeof(Cell))) -#define heapBuilt() (heapFst) extern Int heapSize; extern Heap heapFst, heapSnd; extern Heap heapTopFst; -- 1.7.10.4