 newVar = ->
   "i#{variableCounter++}"
 
-isSplat = (elem) ->
-  elem.token and elem.token[...2] is '..'
-
-stripSplatFromName = (token) ->
-  if token[...2] is '..'
-    token[2...]
-  else
-    token
-
 # end of Pattern matching
 
 # Match, the only real macro so far (doesn't evaluate arguments)

  _declarationInScope: (i, name) ->
    (lookupInMap @scopes[i], name) or
      i > 0 and (@_declarationInScope i - 1, name) or
      throw "Could not find declaration for #{name}"

  addType: (name, type) ->
    if lookupInMap @_scope(), name

;
"""

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

