 typeCompile = (ctx, expression) ->
   throw new Error "invalid typeCompile args" unless expression
   (if isAtom expression
-    typeConstantCompile
+    typeNameCompile
   else if isTuple expression
     typeTupleCompile
   else if isCall expression

        else
          # Typing
          if body and not body.tea
            throw new Error "Body not typed"
          call.tea =
            if body
              new Constrained body.tea.constraints,
                typeFn paramTypeVars..., body.tea.type
            else
              freshInstance ctx, explicitType
          # """λ#{paramNames.length}(function (#{listOf paramNames}) {

    toInject = collectRequiresFor moduleName
    ctx = injectedContext toInject
    {js, ast} = compileCtxAstToJs topLevel, ctx, (astFromSource "(#{source})", -1, -1)
    checkTypes ctx
    replaceOrAddToMap compiledModules, moduleName,
      declared: (subtractContexts ctx, (injectedContext toInject)) # must recompute because ctx is mutated
      js: js
