[project @ 2000-03-30 12:04:13 by simonmar]
[ghc-hetmet.git] / ghc / interpreter / hugs.c
index c27ec7c..16fabe2 100644 (file)
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: hugs.c,v $
- * $Revision: 1.49 $
- * $Date: 2000/03/24 14:32:03 $
+ * $Revision: 1.51 $
+ * $Date: 2000/03/30 12:04:13 $
  * ------------------------------------------------------------------------*/
 
 #include <setjmp.h>
@@ -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;
@@ -234,7 +235,7 @@ String argv[]; {
    readOptions(fromEnv("STGHUGSFLAGS",""));
 
    strncpy(argv_0_orig,argv[0],1000);   /* startupHaskell mangles argv[0] */
-   startupHaskell (argc,argv);
+   startupHaskell (argc,argv,NULL);
    argc = prog_argc; 
    argv = prog_argv;
 
@@ -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");