Unify a pair of unification variables. * If unification fails, then NULL is returned. * If unification is successful, the representative of the equivalence class of unified pair of variables is returned. * If alpha or beta is NULL, then NULL is returned. This allows you to chain calls to 'unify'. * * '*bindings_used' is decremented by the number of pairs of (non-trivial) bindings that are su
| 215 | * have their '.rank' fields active. |
| 216 | */ |
| 217 | static unification_var* unify(unification_var* alpha, unification_var* beta, size_t* bindings_used) { |
| 218 | return alpha && beta ? unify_cont(&(unification_cont){ .alpha = alpha, .beta = beta }, bindings_used) : NULL; |
| 219 | } |
| 220 | |
| 221 | /* Given a census containing a tally of the different tags that occurs in some Simplicity DAG, |
| 222 | * return an upper bound on number of extra unification variables, 'extra_var', |
no test coverage detected