       else
         (jsBinary "instanceof", exp, (validIdentifier symbol)))]
 
-nameTranslate = (ctx, atom, symbol, type) ->
+nameTranslate = (ctx, atom, symbol, type, arity) ->
   if atom.label is 'const'
     switch symbol
       when 'True' then 'true'
       when 'False' then 'false'
       else
         (jsAccess (validIdentifier symbol), "_value")
-  else if ctx.isMethod symbol, type
-    (irMethod type, symbol)
-  else
-    validIdentifier symbol
+  else
+    (irReference symbol, type, arity)
 
 numericalCompile = (ctx, symbol) ->
   translation = if symbol[0] is '~' then (jsUnary "-", symbol[1...]) else symbol

      {
        id: ctx.declarationId symbol
        type: type
        translation: nameTranslate ctx, atom, symbol, type
      }
    # Inside function only defer compilation if we don't know arity
    else if ctx.isInsideLateScope() and (ctx.isDeclared symbol) or contextType instanceof TempType

    [x y] (f ["A" "B"])
  """
  """x""", "A"

  'higher-order use of constrained function'
  """
    Show (class [a]
      show (fn [x] (: (Fn a String))))

    show-string (instance (Show String)
      show (fn [x] x))

    f (fn [pair]
      [(show a) (show b)]
      [a b] pair)

    apply (fn [m to]
      (m to))

    [x y] (apply f ["A" "B"])
  """
  """x""", "A"
  # The following doesn't work because the Collection type class specifies
  # that the constructor takes only one argument.
  #
