From: sewardj Date: Mon, 11 Oct 1999 12:15:13 +0000 (+0000) Subject: [project @ 1999-10-11 12:15:12 by sewardj] X-Git-Tag: Approximately_9120_patches~5714 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b33e4ffd3e6f01dbddf0423510a0d4de95d47558;p=ghc-hetmet.git [project @ 1999-10-11 12:15:12 by sewardj] Try and make finding of Prelude libraries for hugs a bit saner. Guess (badly) the absolute pathname to the hugs executable, and use that to derive the location of the default library. --- diff --git a/ghc/interpreter/hugs.c b/ghc/interpreter/hugs.c index 0c1c925..d076064 100644 --- a/ghc/interpreter/hugs.c +++ b/ghc/interpreter/hugs.c @@ -8,8 +8,8 @@ * in the distribution for details. * * $RCSfile: hugs.c,v $ - * $Revision: 1.8 $ - * $Date: 1999/07/06 15:24:37 $ + * $Revision: 1.9 $ + * $Date: 1999/10/11 12:15:13 $ * ------------------------------------------------------------------------*/ #include @@ -217,6 +217,12 @@ char *argv[]; { CStackBase = &argc; /* Save stack base for use in gc */ + /* Try and figure out an absolute path to the executable, so + we can make a reasonable guess about where the default + libraries (Prelude etc) are. + */ + setDefaultLibDir ( argv[0] ); + /* If first arg is +Q or -Q, be entirely silent, and automatically run main after loading scripts. Useful for running the nofib suite. */ if (argc > 1 && (strcmp(argv[1],"+Q") == 0 || strcmp(argv[1],"-Q")==0)) { @@ -813,9 +819,15 @@ static Void local makeStackEntry ( ScriptInfo* ent, String iname ) if (!(sAvail || (oAvail && iAvail))) internal("chase"); /* Load objects in preference to sources if both are available */ + /* 11 Oct 99: disable object loading in the interim. + Will probably only reinstate when HEP becomes available. fromObj = sAvail ? (oAvail && iAvail && timeEarlier(sTime,oTime)) : TRUE; + */ + + fromObj = FALSE; + /* ToDo: namesUpto overflow */ ent->modName = strCopy(iname); ent->details = TRUE; @@ -1162,7 +1174,7 @@ static Void local whatScripts() { /* list scripts in current session */ if (projectLoaded) Printf(" (project: %s)",currProject); for (i=0; i