 for jsMethod in ['binary', 'ternary', 'unary']
   do (jsMethod) ->
     ms["Js.#{jsMethod}"] = (ctx, call) ->
-      call.tea = "JS"
+      call.tea = toConstrained typeConstant "JS"
       (jsCall "js#{jsMethod[0].toUpperCase()}#{jsMethod[1...]}", (termsCompile ctx, _arguments call))
 
 ms['=='] = ms_eq = (ctx, call) ->

      normalizeConstraints ctx, instanceContraints
    else
      # TODO: propogate this as standard error
      throw new Error "no instance found to satisfy #{printType constraint}"
      null

simplifyConstraints = (ctx, constraints) ->

  for className, dict of values ctx.classParamsForType constraint
    if chain = findSuperClassChain ctx, className, constraint.className
      return accessList dict, chain
  throw new Error "Couldn't find dict for #{safePrintType constraint}"

findSuperClassChain = (ctx, className, targetClassName) ->
  for s in (ctx.classNamed className).supers
