code: function typeClassConstraintViolation(
      env,            // :: Array Type
      typeInfo,       // :: TypeInfo
      typeClass,      // :: TypeClass
      index,          // :: Integer
      propPath,       // :: PropPath
      value,          // :: Any
      typeVarMap      // :: TypeVarMap
    ) {
      var expType = resolvePropPath (typeInfo.types[index], propPath);
      return new TypeError (trimTrailingSpaces (
        'Type-class constraint violation\n\n' +
        underline (typeInfo,
                   function(tvn) {
                     return function(tc) {
                       return (
                         tvn === expType.name && tc.name === typeClass.name ?
                           r ('^') :
                           _
                       );
                     };
                   },
                   formatType6 (Z.concat ([index], propPath))) +
        '\n' +
        showValuesAndTypes (env, typeInfo, [value], 1) + '\n\n' +
        q (typeInfo.name) + ' requires ' +
        q (expType.name) + ' to satisfy the ' +
        stripNamespace (typeClass) + ' type-class constraint; ' +
        'the value at position 1 does not.\n' +
        see ('type class', typeClass)
      ));
    }
docs: typeClassConstraintViolation :: ... -> Error