* included in the distribution.
*
* $RCSfile: free.c,v $
- * $Revision: 1.7 $
- * $Date: 1999/11/01 11:07:07 $
+ * $Revision: 1.12 $
+ * $Date: 2000/04/27 16:35:29 $
* ------------------------------------------------------------------------*/
-#include "prelude.h"
+#include "hugsbasictypes.h"
#include "storage.h"
-#include "backend.h"
#include "connect.h"
#include "errors.h"
* Local functions
* ------------------------------------------------------------------------*/
-static List freeVarsAlt Args((List, StgCaseAlt));
-static List freeVarsPrimAlt Args((List, StgPrimAlt));
-static List freeVarsExpr Args((List, StgExpr));
-static List freeVarsAtom Args((List, StgAtom));
-static List freeVarsVar Args((List, StgVar));
+static List freeVarsAlt ( List, StgCaseAlt );
+static List freeVarsPrimAlt ( List, StgPrimAlt );
+static List freeVarsExpr ( List, StgExpr );
+static List freeVarsAtom ( List, StgAtom );
+static List freeVarsVar ( List, StgVar );
/* --------------------------------------------------------------------------
* Free variable analysis
static List freeVarsExpr( List acc, StgExpr e )
{
+#if 0
+ printf( "freeVarsExpr: " );ppStgExpr(e);printf("\n");
+#endif
switch (whatIs(e)) {
case LETREC:
mapAccum(freeVarsBind,acc,stgLetBinds(e));
case STGVAR:
return freeVarsVar(acc, e);
case NAME:
+ case TUPLE:
return acc; /* Names are never free vars */
default:
- /*
printf("\n");
ppStgExpr(e);
printf("\n");
- */
internal("freeVarsExpr");
}
}