module = getModule(module, name);
    public void compile(String main, String[] args) {        String names = main.replace('/', '.') + (main.length() > 0 ? "." : "");        if (names.length() > 0 && names.charAt(0) == '.') {            error("illegal module name '" + main + "'");            return;        }        Symbol module = global.definitions.ROOT;        for (int i = 0, j; (j = names.indexOf('.', i)) >= 0; i = j + 1) {            Name name = Name.fromString(names.substring(i, j));            if (module == Symbol.NONE) {                error("could not find module '" + main.substring(0, j) + "'");                return;            }            if (module == Symbol.ERROR) {                error("term '" + main.substring(0, j) + "' is not a module");                return;            }        }        Name name = Compiler.MAIN_N;        Type type = MAIN_TYPE;        Symbol method = getMethod(module, name, type.erasure());        if (method == Symbol.NONE) {            error("module '" + main + "' has no method '" + name + "'");            return;        }        if (method == Symbol.ERROR) {            error("module '" + main + "' has no method '" + name +                "' with type '" + type + "'");            return;        }        int pos = Position.NOPOS;        global.units = new Unit[1];        global.units[0] = new Unit(global, new Sourcefile((byte[])null,false));        global.units[0].body = new Tree[1];        global.units[0].body[0] = global.treeGen.Apply(            global.treeGen.mkRef(pos, module.thisType(), method),            new Tree[] { global.make.Literal(pos, args) });    }