   ctx
 
 collectRequiresFor = (name) ->
-  collectRequiresWithAcc name, newSet()
+  collectRequiresWithAcc name, newMap()
 
 collectRequiresWithAcc = (name, acc) ->
   compiled = lookupInMap moduleGraph, name
   if not compiled
     console.error "#{name} module not found"
-    newSet()
+    newMap()
   else
     {requires} = compiled
     collected = reduceSet collectRequiresWithAcc,
-      (concatSets requires, acc),
-      (subtractSets requires, acc)
-    concatSets collected, acc
-
+      (concatMaps requires, acc),
+      (subtractMaps requires, acc)
+    concatMaps collected, acc
 
 findMatchingDefinitions = (moduleName, reference) ->
   {declared: {savedScopes}} = lookupCompiledModule moduleName

      (map compileVariableAssignment, translationCache)
      varList varNames
      compiledCases])

ms.format = ms_format = (ctx, call) ->
  typeTable =

    @classParams = newMap()
    @types = []
    @isMalformed = no
    @_requested = newMap()

  req: (moduleName, names) ->
    addToMap @_requested, moduleName, names

  requested: ->
    if @_requested.size > 0
      @_requested

  markMalformed: ->
    @isMalformed = yes
