   if ctx.shouldDefer()
     shouldDeclareFinally = ctx.isDeclared ctx.deferReason()[1]
     for {name, id} in definedNames
-      if not ctx.isCurrentlyDeclared name
+      if not ctx.isFinallyCurrentlyDeclared name
         if shouldDeclareFinally
           ctx.declare name, id: id
         else

          [[(validIdentifier symbol), exp]]
  else
    # Name typed, use a fresh instance
    # log symbol, contextType
    if contextType and contextType not instanceof TempType
      type = freshInstance ctx, contextType
      nameTranslate ctx, atom, symbol, type
    # In sub-scope (function) only defer compilation for declarations in current scope
    else if (not ctx.isCurrentlyDeclared symbol) and
        (ctx.isFinallyDeclared symbol) or contextType instanceof TempType
      # Typing deferred, use an impricise type var
      type = toConstrained ctx.freshTypeVariable star
      ctx.addToDeferredNames {name: symbol, type: type}


  'pattern match syntax'
  """
  + (macro [x y]
    (: (Fn Num Num Num))
    (Js.binary "+" x y))

  infix (syntax [exp]
    (match exp
      (` ((, x) (, op) (, z))) (` ((, op) (, x) (, z)))
