}
private Code transform(Code.FunCall e) {
Code r = e;
try {
WycsFile module = builder.getModule(e.nid.module());
// In principle, module should not be null if TypePropagation has
// already passed. However, in the case of a function call inserted
// during code generation, there is no guarantee that it was
// previously resolved. This can cause problems if the standard
// library is not on the path as e.g. x[i] is translated into
// a call to wycs.core.Map.IndexOf().
if(module == null) {
internalFailure("cannot resolve as module: " + e.nid.module(), filename, e);
}
Object d = module.declaration(e.nid.name());
if(d instanceof WycsFile.Function) {
// Do nothing, since functions are not expanded like macros.
// Instead, their axioms may be instantiated later either before
// or during rewriting.
} else if (d instanceof WycsFile.Macro) {