* included in the distribution.
*
* $RCSfile: hugs.c,v $
- * $Revision: 1.65 $
- * $Date: 2000/04/10 14:28:14 $
+ * $Revision: 1.66 $
+ * $Date: 2000/04/10 15:39:09 $
* ------------------------------------------------------------------------*/
#include <setjmp.h>
static String local strCopy ( String );
static Void local browseit ( Module,String,Bool );
static Void local browse ( Void );
+static void local clearCurrentFile ( void );
+
/* --------------------------------------------------------------------------
* Machine dependent code for Hugs interpreter:
*toggle[i].flag = state;
return;
}
+ clearCurrentFile();
ERRMSG(0) "Unknown toggle `%c'", c
- EEND;
+ EEND_NO_LONGJMP;
}
static Void local togglesIn(state) /* Print current list of toggles in*/
String s = readFilename();
if (s && chdir(s)) {
ERRMSG(0) "Unable to change to directory \"%s\"", s
- EEND;
+ EEND_NO_LONGJMP;
}
}
bd = type;
if (whatIs(bd)==QUAL) {
+ clearCurrentFile();
ERRMSG(0) "Unresolved overloading" ETHEN
ERRTEXT "\n*** Type : " ETHEN ERRTYPE(type);
ERRTEXT "\n*** Expression : " ETHEN ERREXPR(inputExpr);
} else {
Cell d = provePred(ks,NIL,ap(classShow,bd));
if (isNull(d)) {
+ clearCurrentFile();
ERRMSG(0) "Cannot find \"show\" function for:" ETHEN
ERRTEXT "\n*** expression : " ETHEN ERREXPR(inputExpr);
ERRTEXT "\n*** of type : " ETHEN ERRTYPE(type);
names = addNamesMatching((String)0,names);
}
if (isNull(names)) { /* Then print them out */
+ clearCurrentFile();
ERRMSG(0) "No names selected"
EEND_NO_LONGJMP;
return;
modConIds = initialize(argc,argv); /* the initial modules to load */
setBreakAction ( HugsIgnoreBreak );
prelOK = loadThePrelude();
- if (combined) everybody(POSTPREL);
if (!prelOK) {
if (autoMain)
exit(1);
}
+ if (combined) everybody(POSTPREL);
loadActions(modConIds);
if (autoMain) {
* included in the distribution.
*
* $RCSfile: machdep.c,v $
- * $Revision: 1.28 $
- * $Date: 2000/04/10 09:40:03 $
+ * $Revision: 1.29 $
+ * $Date: 2000/04/10 15:39:09 $
* ------------------------------------------------------------------------*/
#ifdef HAVE_SIGNAL_H
#if (DOS_FILENAMES || __CYGWIN32__)
# define SLASH '\\'
+# define SLASH_STR "\\"
# define isSLASH(c) ((c)=='\\' || (c)=='/')
# define PATHSEP ';'
# define PATHSEP_STR ";"
# define DLL_ENDING ".pef"
#else
# define SLASH '/'
+# define SLASH_STR "/"
# define isSLASH(c) ((c)==SLASH)
# define PATHSEP ':'
# define PATHSEP_STR ":"
Int nPath;
Bool literate;
String peStart, peEnd;
- String augdPath; /* .:hugsPath:installDir/GhcPrel:installDir/lib */
+ String augdPath; /* .:hugsPath:installDir/../lib/std:installDir/lib */
Time oTime, iTime;
Bool oAvail, iAvail;
*sSize = *oSize = *iSize = 0;
augdPath = malloc( 2*(10+3+strlen(installDir))
- +strlen(hugsPath) +10/*paranoia*/);
+ +strlen(hugsPath) +50/*paranoia*/);
if (!augdPath)
internal("moduleNameToFileNames: malloc failed(2)");
if (combined) {
strcat(augdPath, installDir);
- strcat(augdPath, "GhcPrel");
+ strcat(augdPath, "..");
+ strcat(augdPath, SLASH_STR);
+ strcat(augdPath, "lib");
+ strcat(augdPath, SLASH_STR);
+ strcat(augdPath, "std");
strcat(augdPath, PATHSEP_STR);
}
strcat(augdPath, "lib");
strcat(augdPath, PATHSEP_STR);
- /* fprintf ( stderr, "augdpath = `%s'\n", augdPath ); */
+ /* fprintf ( stderr, "augdpath = `%s'\n", augdPath ); */
peEnd = augdPath-1;
while (1) {