       throw new Error "Macro #{name} already defined"
     else
       addToMap topScope.macros, name, macro
-  for name, {type, arity, docs, isClass, virtual, final} of values definitions when shouldImport name
-    addToMap topScope, name, {type, arity, docs, isClass, virtual, final}
+  for name, {type, arity, docs, source, isClass, virtual, final} of values definitions when shouldImport name
+    addToMap topScope, name, {type, arity, docs, source, isClass, virtual, final}
   topScope.typeNames = concatMaps topScope.typeNames, typeNames
   topScope.classes = concatMaps topScope.classes, classes
   ctx.scopeIndex += compiledModule.savedScopes.length

  type.op and (typeEq type.op, zeroArrowType)

findDocsFor = (moduleName, reference) ->
  {declared: {savedScopes}} = lookupCompiledModule moduleName
  {ctx} = contextWithDependencies reverseModuleDependencies moduleName
  {name, scope} = reference
  while scope > 0 and not found
    savedScope = savedScopes[scope]
    break if not savedScope
    found = lookupInMap savedScope.definitions, name
    scope = savedScope.parent
  found or= lookupInMap ctx._scope(), name # Top scope
  if found
    {arity, type, docs} = found
    {name: name, rawType: type, docs, arity}

# API


        # Ready for typing since there are no missing dependencies
        deferredConstraints = inferType ctx, name, type, constraints, polymorphic
        ctx.addToScopeConstraints deferredConstraints

  if definedNames.length is 1
    ctx.addDefinitionSource (_fst definedNames).name, matched

  precs: precs ? []
  assigns: assigns ? []
