        modules =  try! Environment(name: "modules", parent: nil);
    }

    // private

    func finish() {
        currentEnvironment = try! Environment(name: "next environemnt", parent: currentEnvironment); // TODO
    }

    func require<T :EnvironmentModule>(_ type :  T.Type) throws -> Void {
        let module = try modules!.getBean(type)

        try buildModule(module: module as! EnvironmentModule)
    }
