   isInTopScope: ->
     @_scope().topLevel
 
-  declaration: (name) ->
+  isDeclared: (name) ->
+    !!(@_declaration name)
+
+  _declaration: (name) ->
     @_declarationInScope @scopes.length - 1, name
 
   _declarationInScope: (i, name) ->

  termCompile ctx, term for term in list

termCompile = (ctx, term) ->
  ctx.subName()
  ctx.setIsOperator no
  compiled = expressionCompile ctx, term
  ctx.resetIsOperator()
  ctx.resetName()
  compiled

expressionsCompile = (ctx, list) ->


  compiledPairs

definitionPairCompile = (ctx, pattern, value) ->
  # log "COMPILING", pattern, value
  ctx.definePattern pattern
  # log "deferrement before assign !!!", ctx.shouldDefer()
  compiled = expressionCompile ctx, value
  ctx.leaveDefinition()
  if ctx.shouldDefer()
    # log "RESETTING DEFER"
    ctx.setDefer false
