When generating wrapper code for primops/callouts with return type
IO (), don't allocate a unit to return. Instead, return the address
of the unit closure.
* included in the distribution.
*
* $RCSfile: translate.c,v $
- * $Revision: 1.16 $
- * $Date: 1999/11/16 17:38:58 $
+ * $Revision: 1.17 $
+ * $Date: 1999/11/22 17:18:02 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
}
rs = cons(v,rs);
}
+
/* Construct tuple of results */
+ if (i == 0) {
+ e = nameUnit;
+ } else
if (i == 1) {
e = hd(bs);
- } else { /* includes i==0 case */
+ } else {
StgVar r = mkStgVar(mkStgCon(mkTuple(i),rev(bs)),NIL);
rbinds = cons(r,rbinds);
e = r;