X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Finterpreter%2Fhugs.c;h=16fabe2bd3196665f179fdc3a3ff371c2c89b370;hb=9a3395bdd27e9eb66a77d670a4291c312d65fc26;hp=c27ec7c4df64d38521417a01b5c30f7e8ffc6b70;hpb=528a7d2cf1c90408d60028bb1fec85124d539476;p=ghc-hetmet.git diff --git a/ghc/interpreter/hugs.c b/ghc/interpreter/hugs.c index c27ec7c..16fabe2 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.51 $ + * $Date: 2000/03/30 12:04:13 $ * ------------------------------------------------------------------------*/ #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; @@ -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");