fn is_ctrl_typevar_candidate(
    ctrl_typevar: &TypeVar,
    operands_in: &[Operand],
    operands_out: &[Operand]
) -> Result<Vec<TypeVar>, String>
Expand description

Verify that the use of TypeVars is consistent with ctrl_typevar as the controlling type variable.

All polymorhic inputs must either be derived from ctrl_typevar or be independent free type variables only used once.

All polymorphic results must be derived from ctrl_typevar.

Return a vector of other type variables used, or a string explaining what went wrong.