   typeOrConstraint
 
 mutateMarkingOrigin = (typeOrConstraint, expression) ->
-  # typeOrConstraint.origin = expression
+  typeOrConstraint.origin = expression
 
 # Clones constrained types and parts of them
 # Class constraint arguments are not cloned

  # allDefs = concatMaps typed, notTyped # TODO: don't use object key ordering for ordering
  # values mapMap (__ plainPrettyPrint, _type), allDefs

subMagnitude = (sub) ->
  magnitude = 0
  for s in sub.vars when s
    magnitude +=
      if s.TypeApp
        opName = actualOpName s.op

    #   not isFailed mostGeneralUnifier (freshInstance ctx, def.type).type, type.type
    # [typed, notTyped] = partitionMap typesUnify, validDefinitions
    scoreAndPrint = (def) ->
      freshedType = substitute newMap(), type.type
      checkedType = (freshInstance ctx, def.type).type
      sub = mostGeneralUnifier checkedType, freshedType
      if isFailed sub
        score = -Infinity
      else
        score = -((subMagnitude checkedType, freshedType) + i * 100)
      type: plainPrettyPrint def.type#score + ' ' +
      arity: def.arity
      docs: def.docs
