* included in the distribution.
*
* $RCSfile: static.c,v $
- * $Revision: 1.34 $
- * $Date: 2000/04/04 01:07:49 $
+ * $Revision: 1.38 $
+ * $Date: 2000/04/06 00:01:27 $
* ------------------------------------------------------------------------*/
#include "hugsbasictypes.h"
name(n).defn = nameId;
} else {
implementCfun(n,scs);
+ name(n).hasStrict = nonNull(scs);
}
hd(cs) = n;
EEND;
}
-#if 0
- what is this for??
- if (!moduleThisScript(name(n).mod)) {
- return n;
- }
-#endif
/* Later phases of the system cannot cope if we resolve references
* to unprocessed objects too early. This is the main reason that
* we cannot cope with recursive modules at the moment.
#endif
Void checkDefns ( Module thisModule ) { /* Top level static analysis */
+ Text modName = module(thisModule).text;
staticAnalysis(RESET);
mapProc(checkQualImport, module(thisModule).qualImports);
mapProc(checkUnqualImport,unqualImports);
/* Add "import Prelude" if there`s no explicit import */
-#if 0
- if (thisModule==modulePrelude || thisModule == modulePrelude2) {
+ if (modName == textPrelPrim || modName == textPrelude) {
/* Nothing. */
} else if (isNull(cellAssoc(modulePrelude,unqualImports))
&& isNull(cellRevAssoc(modulePrelude,module(thisModule).qualImports))) {
unqualImports = cons(pair(modulePrelude,DOTDOT),unqualImports);
} else {
- /* Every module (including the Prelude) implicitly contains
- * "import qualified Prelude"
+ /* Every module implicitly contains "import qualified Prelude"
*/
module(thisModule).qualImports
=cons(pair(mkCon(textPrelude),modulePrelude),
module(thisModule).qualImports);
}
-#endif
mapProc(checkImportList, unqualImports);
/* Note: there's a lot of side-effecting going on here, so