 
 
 trueMacros =
-  'match': (onwhat, cases...) ->
+  'match': (hoistableWheres, onwhat, cases...) ->
+    #log printAst hoistableWheres
     varNames = []
     if not onwhat
       throw new Error 'match `onwhat` missing'

  'list': (items...) ->
    "$listize(#{compileList items})"

toJsString = (token) ->
  "'#{token}'"


  else
    compileDef [name, def]

compileImpl = (node, hoistableWheres = []) ->
  # For now special case match to allow definition hoisting up one level
  if Array.isArray(node) and node.length > 0
    [op, args...] = inside node
    if op.type is 'operator' and op.token is 'match'
      return trueMacros[op.token] hoistableWheres, args...

    ###
    if hoistableWheres.length > 0
      allNames = []
      for [_, _, names] in hoistableWheres
        allNames.push names...
      throw new Error "#{allNames.join ','} used but not defined yet"###

  switch node.type
    when 'comment' then 'null'
    when 'data' then 'null'
    when 'type' then 'null'
    when 'function'
      compileFn node
    else
      if Array.isArray node
        exps = inside node
