code: function invalidValue(
      env,            // :: Array Type
      typeInfo,       // :: TypeInfo
      index,          // :: Integer
      propPath,       // :: PropPath
      value           // :: Any
    ) {
      var t = resolvePropPath (typeInfo.types[index], propPath);
  
      var underlinedTypeVars =
      underline (typeInfo,
                 K (K (_)),
                 formatType6 (Z.concat ([index], propPath)));
  
      return new TypeError (trimTrailingSpaces (
        t.type === VARIABLE &&
        isEmpty (determineActualTypesLoose (env, [value])) ?
          'Unrecognized value\n\n' +
          underlinedTypeVars + '\n' +
          showValuesAndTypes (env, typeInfo, [value], 1) + '\n\n' +
          toMarkdownList (
            'The environment is empty! ' +
            'Polymorphic functions require a non-empty environment.\n',
            'The value at position 1 is not a member of any type in ' +
            'the environment.\n\n' +
            'The environment contains the following types:\n\n',
            showTypeWith (typeInfo.types),
            env
          ) :
        // else
          'Invalid value\n\n' +
          underlinedTypeVars + '\n' +
          showValuesAndTypes (env, typeInfo, [value], 1) + '\n\n' +
          'The value at position 1 is not a member of ' +
          q (show (t)) + '.\n' +
          see (arityGte (1) (t) ? 'type constructor' : 'type', t)
      ));
    }
docs: invalidValue :: ... -> Error