 hashmapType = new TypeConstr 'Map', kindFn 2
 hashsetType = new TypeConstr 'Set', kindFn 1
 stringType = typeConstant 'String'
+charType = typeConstant 'Char'
 boolType = typeConstant 'Bool'
 numType = typeConstant 'Num'
 

      | [#{controls}] # delims
      | /([^\\x20]|\\/)([^/]|\\/)*?/ # regex
      | "(?:[^"\\]|\\.)*" # strings
      | \\[^\x20] # char
      | [^#{controls}"'\s]+ # normal tokens
      )///
    if not match

    if ctx.assignTo()
      precs: [cond_ (jsBinary "===",
        (jsAccess ctx.assignTo(), "string"), "#{symbol}.string")]

specialCharacters =  "\\newline \\tab \\formfeed \\backspace \\return".split ' '
charCompile = (ctx, atom, symbol) ->
  translation =
    if symbol.length is 2
      '"' + symbol[1] + '"'
    else if symbol is "\\space"
      ' '
    else if symbol in specialCharacters
      "\"\\#{symbol[1]}\""
    else if /^\\x[a-fA-F0-9]{2}/.test symbol
      '"' + symbol + '"'
    else if /^\\u[a-fA-F0-9]{4}/.test symbol
      '"' + symbol + '"'
    else
      malformed atom, 'Unrecognized character'
      ''
  type: toConstrained charType
  translation: translation
  pattern: literalPattern ctx, translation

literalPattern = (ctx, translation) ->
  if ctx.assignTo()
