       compiledBody = termCompile ctx, body
       # log "compiled", body.tea
       ctx.closeScope()
+
+      # Arity - before deferring
+      if ctx._name()
+        ctx.addArity ctx._name(), paramNames
+
+      return 'deferred' if ctx.shouldDefer()
+
+      # Typing
       call.tea = typeFn paramTypes..., body.tea
 
       # Syntax
       isUsedParam = (expression) ->
         (isName expression) and (_token expression) in paramNames
       map (syntaxNameAs '', 'param'), filterAst isUsedParam, body
-
-      # Arity
-      if ctx._name()
-        ctx.addArity ctx._name(), paramNames
 
       assignCompile ctx, call,
         """λ(function (#{listOf paramNames}) {

;
"""


exports.compile = (source) ->
  library + compileDefinitions source



  arity: (name) ->
    (@declaration name).arity

  freshTypeVariable: (kind) ->
    if not kind
