 patternMatchingRules = [
   (pattern) ->
     trigger: pattern.label is 'numerical'
-    cond: (exp) -> ["#{exp} == #{pattern.token}"]
+    cond: (exp) -> ["#{exp}" + " == #{pattern.token}"]
+  (pattern) ->
+    trigger: pattern.label is 'const'
+    cond: (exp) -> ["'#{pattern.token}' in #{exp}"]
   (pattern) ->
     trigger: pattern.label is 'name'
     assignTo: (exp) ->

  [constr, args...] = elems
  items = args.map(compileImpl).join ', '
  "({\"#{constr.token}\": [#{items}]})"

compileList = (elems) ->
  # "[#{elems.join ', '}]"

            fn = compileImpl op
            # TODO: this expandMacro doesn't make sense
            "#{fn}(#{(args.map compileImpl).join ', '})"
      else if node.label is 'const'
        compileConst node
      else if node.token.match /^"/
        node.token
      else
        validIdentifier node.token

isList = (node) ->
  Array.isArray(node) and node[0].token is '['

isTuple = (node) ->
  Array.isArray(node) and node[0].token is '{'

isMap = (node) ->
  isTuple(node) and (elems = inside node; elems.length > 0) and elems[0].label is 'label'
