 constantToSource = (value) ->
   switch typeof value
     when 'boolean' then (tokenize (if value then 'True' else 'False'))[0]
-    when 'number' then (tokenize (if value < 0 then "~#{Math.abs value}" else "#{value}"))[0]
+    when 'number' then (tokenize (if value < 0 then "-#{Math.abs value}" else "#{value}"))[0]
     when 'string' then (tokenize JSON.stringify value)[0]
     when 'object'
       kind = Object.prototype.toString.call(value).slice(8, -1)

constantLabeling = (atom) ->
  {symbol} = atom
  labelMapping atom, [
    ['numerical', -> /^~?(\d+|Infinity)/.test symbol]
    ['label', -> isLabel atom]
    ['string', -> /^"/.test symbol]
    ['char', -> /^\\/.test symbol]

  pattern: precs: []

numericalCompile = (ctx, atom, symbol) ->
  translation = symbol#if symbol[0] is '-' then (jsUnary "-", symbol[1...]) else symbol
  type: toConstrained markOrigin numType, atom
  translation: translation
  pattern: literalPattern ctx, translation
