-#if 0
-Looks like a hack to me.
- if (isName(fun)) {
- if (nonNull(name(fun).closure))
- fun = name(fun).closure; else
- fun = cptrFromName(fun);
- }
-
- if (isCPtr(fun)) {
- assert(isName(fun0));
- itsaPAP = name(fun0).arity > length(args);
-# if DEBUG_CODEGEN
- fprintf ( stderr, "nativeCall: name %s, arity %d, args %d\n",
- nameFromOPtr(cptrOf(fun)), name(fun0).arity,
- length(args) );
-# endif
- } else {
- itsaPAP = FALSE;
- if (nonNull(stgVarBody(fun))
- && whatIs(stgVarBody(fun)) == LAMBDA
- && length(stgLambdaArgs(stgVarBody(fun))) > length(args)
- )
- itsaPAP = TRUE;
- }
-#endif