 compileMap = (elems) ->
   [constr, args...] = elems
   items = args.map(compileImpl).join ', '
-  "({\"#{constr.token}\": [#{items}]})"
+  "({\"#{constructorToJsField constr}\": [#{items}]})"
+
+constructorToJsField = (constr) ->
+  constr.token[0...-1]
 
 compileConst = (token) ->
   "({'#{token.token}': true})"

# Pattern matching in assignment (used in Match as well)

patternMatchingRules = [
  (pattern) ->
    trigger: pattern.label is 'numerical'
    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) ->

  recurse: '#67B3DD'
  param: '#FDA947'
  comment: 'grey'
  operator: '#67B3DD'
  normal: 'white'

colorize = (color, string) ->
