 labelNames = (pattern) ->
   if Array.isArray pattern
     if isList(pattern) or isTuple pattern
+      pattern.type = 'pattern'
       (inside pattern).map labelNames
     else
       [op, args...] = inside pattern

      ['brace', token in ['{', '}']]
      ['bare', true]

labelMatches = (ast) ->
  macro 'match', ast, (node, args) ->
    [keyword, over, patterns...] = args

    node

isReference = (token) ->
  token.label in ['bare', 'operator', 'param', 'recurse'] and not isDelim token

fnDefinition = (node) ->
  words = inside node
  [keyword, paramList, defs...] = words
  params = if Array.isArray(paramList) then paramList else undefined
  defs ?= []
  for def, i in defs
    if matchNode '::', def
