   """
   '3', 3
 
+  'dont lift when used in function'
+  """
+  Maybe (data [a]
+    None
+    Some [value: a])
+
+  f (fn [x]
+    (match x
+      None (g 4)
+      (Some v) h)
+    h 45
+    hh h
+    g (fn [x]
+      h)
+    p (fn [x] (p x)))
+  """
+  '(f None)', 45
+
+
   # TODO: support matching with the same name
   #       to implement this we need the iife to take as arguments all variables
   #       with the same names, since JavaScript shadows it too strongly and

    @_currentDefinition()?.definedNames?.push binding

  addToUsedNames: (name) ->
    (@_currentDeferrableDefinition() or
      (@_scopeOfDeclared @scopes.length - 1, name)).usedNames?.push name

  definedNames: ->
    @_currentDefinition()?.definedNames ? []

  usedNames: ->
    (@_currentDeferrableDefinition() or @_scope()).usedNames ? []

  setUsedNames: (usedNames) ->
    @_scope().usedNames = usedNames


findDeps = (ctx) -> (names) ->
  auxiliaries = ctx.auxiliaries()
  depSet = newSet()
  auxiliaryDependencies auxiliaries, names, depSet
  arrayToSet reverse setToArray depSet

auxiliaryDependencies = (graph, names, allSet) ->
  for name in names
    if not inSet allSet, name
      addToSet allSet, name
      auxiliaryDependencies graph, ((lookupInMap graph, name)?.deps or []), allSet
  return
  # concat (for name in names
  #   join (deps = ((lookupInMap graph, name)?.deps or [])),
  #     auxiliaryDependencies graph, deps)

ms.syntax = ms_syntax = (ctx, call) ->
  hasName = requireName ctx, 'Name required to declare a new syntax macro'
