       className = op.symbol
       {constraint} = ctx.classNamed className
       paramKinds = (map kind, constraint.types.types)
-      new ClassConstraint op.symbol, new Types (typesCompile ctx, args, paramKinds)
+      markOrigin (new ClassConstraint op.symbol,
+        new Types (typesCompile ctx, args, paramKinds)), expression
     else
       malformed ctx, expression, 'Class name required in a constraint'
   else

typeTupleCompile = (ctx, form) ->
  (labelOperator form)
  elemTypes = _terms form
  applyKindFn (tupleType elemTypes.length), (typesCompile ctx, elemTypes)...

typeConstructorCompile = (ctx, call) ->
  op = _operator call


unify = (ctx, t1, t2) ->
  throw new Error "invalid args to unify" unless ctx instanceof Context and t1 and t2
  # TODO: need to taint the other type
  # if (includesJsType t1) or (includesJsType t2)
  #   return
  sub = ctx.substitution
  ctx.extendSubstitution mostGeneralUnifier (substitute sub, t1), (substitute sub, t2)

