     @importedModules = newSet()
     @_requested = newMap()
 
-  req: (moduleName, names) ->
-    addToMap @_requested, moduleName, names
+  req: (moduleName, importSetup) ->
+    addToMap @_requested, moduleName, importSetup
     if not @isModuleLoaded moduleName
       @_requesting = yes
 

          declareImported ctx, name
      else
        malformed ctx, arg, 'Name required'
  irImport moduleName, (setToArray requiredNames), moduleNameAtom

resolveModuleName = (ctx, declaredModuleName) ->
  modulePathToName (resolveModulePathFrom ctx.typedModulePath.names,


injectedContext = (modulesToInject, shouldDeclare) ->
  ctx = new Context
  for moduleName, {naming, importAll} of values modulesToInject when compiled = lookupCompiledModule moduleName
    injectContext ctx, shouldDeclare, compiled.declared, moduleName, naming or newMap(), importAll
  ctx

injectContext = (ctx, shouldDeclare, compiledModule, moduleName, naming, importAll) ->
  {definitions, typeNames, classes, macros} = compiledModule
  topScope = ctx._scope()
  nameAfterImport = (name) -> importAll and name or lookupInMap naming, name
  for name, macro of values macros when newName = nameAfterImport name
    if ctx.isMacroDeclared newName
      throw new Error "Macro #{newName} already defined"
    else
      addToMap topScope.macros, newName, macro
  for name, definition of values definitions when newName = nameAfterImport name
    {type, arity, docs, source, isClass, virtual, final, exported} = definition
    addToMap topScope, newName, {
      arity, docs, source, isClass, virtual, final,
      type: (type if shouldDeclare)
      tempType: type
