 #   // [a] (req ./Some/Submodule)              => I need to know the type of the module in the path
 #   var _temp = require('./Some').Submodule;
 #
-irImport = (moduleName, names, moduleNameAtom) ->
-  {ir: irImportTranslate, moduleName, names, moduleNameAtom}
-
-irImportTranslate = (ctx, {moduleName, names, moduleNameAtom}) ->
+irImport = (moduleName, naming, moduleNameAtom) ->
+  {ir: irImportTranslate, moduleName, naming, moduleNameAtom}
+
+irImportTranslate = (ctx, {moduleName, naming, moduleNameAtom}) ->
   # TODO: pass this info in through context instead of a direct call
   importedTypedModulePath = moduleNameToTypedModulePath moduleName, ctx.typedModulePath
   if not importedTypedModulePath

  modules: setToArray modules

moduleDependencies = (moduleName) ->
  concatSets (requiresFor moduleName), (newSetWith moduleName)

runtimeDependencies = (moduleName) ->
  concatSets (collectRequiresFor moduleName), (newSetWith moduleName)

reverseModuleDependencies = (moduleName) ->
  concatSets (newSetWith moduleName), (requiresFor moduleName)

modulePathToName = (path) ->
  path.join '/'

  submoduleLookup = reduce jsAccess, parts
  temp = ctx.newJsVariable()
  jsStatementList (join [jsVarDeclaration temp, submoduleLookup],
      for oldName, newName of values naming
        jsVarDeclaration (validIdentifier newName), (jsAccess temp, oldName))

isTypeAnnotation = (expression) ->
  (isCall expression) and (':' is _symbol _operator expression)
