 
   paramNames = ctx.arity operator.symbol
   if not paramNames
-    log "deferring in known call #{operator.symbol}"
+    # log "deferring in known call #{operator.symbol}"
     ctx.setDefer operator.symbol
     return 'deferred'
   positionalParams = filter ((param) -> not (lookupInMap labeledArgs, param)), paramNames

      throw new Error "Could not recognize a token starting with `#{input[0..10]}`"
    [symbol] = match
    input = input[symbol.length...]
    pos = currentPos
    currentPos += symbol.length
    constantLabeling {symbol, pos}

controls = '\\(\\)\\[\\]\\{\\}'


;
"""

# API

compileTopLevel = (ast) ->
  compiled = topLevel (ctx = new Context), ast
  types: values mapMap (__ highlightType, _type), ctx._scope()
  js: library + compiled

compileExpression = (ast) ->
  compiled = expressionCompile (ctx = new Context), ast
  types: values mapMap (__ highlightType, _type), ctx._scope()
  js: compiled

astizeList = (source) ->
  astize tokenize "(#{source})", -1

astizeExpression = (source) ->
  astize tokenize source


# end of API

# Utils

join = (seq1, seq2) ->
  seq1.concat seq2

concatMap = (fn, list) ->
  concat map fn, list

concat = (lists) ->
  [].concat lists...

id = (x) -> x

map = (fn, list) ->
  if list then list.map fn else (list) -> map fn, list

allMap = (fn, list) ->
  all (map fn, list)

all = (list) ->
  (filter _is, list).length is list.length

filter = (fn, list) ->
  list.filter fn

partition = (fn, list) ->
  [(filter fn, list), (filter ((x) -> not (fn x)), list)]

_notEmpty = (x) -> x.length > 0

_is = (x) -> !!x

__ = (fna, fnb) ->
  (x) -> fna fnb x

# end of Utils



exports.compileTopLevel = compileTopLevel
exports.compileExpression = compileExpression
exports.astizeList = astizeList
exports.astizeExpression = astizeExpression

# exports.compileModule = (source) ->
#   """
