 
 assignCompile = (ctx, expression, translatedExpression) ->
   # if not translatedExpression # TODO: throw here?
-    #log expression
   if ctx.isAtDefinition()
     to = ctx.definitionPattern()
 

      name: pattern?.symbol
      pattern: pattern
      inside: 0
      deferredBindings: []
      definedNames: []
      _defer: undefined

  leaveDefinition: ->
    @_scope().definition = undefined

    compiledCases = conditional (for [pattern, result] in pairs cases

      ctx.newScope() # for variables defined inside pattern
      ctx.defineNonDeferrablePattern pattern
      {precs, assigns} = patternCompile ctx, pattern, subject, subjectCompiled

      # Compile the result, given current scope
      compiledResult = termCompile ctx, result #compileImpl result, furtherHoistable
      ctx.leaveDefinition()
      ctx.closeScope()

      if ctx.shouldDefer()
        continue

      # log "unifying in match", result, resultType, result.tea
      unify ctx, resultType, result.tea
      varNames.push (findDeclarables precs)...

