From de3ee9f469626e35aa62caa2085c9ce6b688942e Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Fri, 14 Aug 2026 19:07:09 +0200 Subject: [PATCH 1/6] Make the typed layers n-ary: Tarrow params and Texp_function params Types.Tarrow carries a parameter list (Tarrow of arg list * type_expr); Texp_function carries typed parameters {fp_lbl; fp_param; fp_pat; fp_partial} and a body; Ttyp_arrow and Otyp_arrow follow. The arity annotation and its int-option phantom state are gone from the compiler. Type relations compare parameters pairwise; a length mismatch is structural incompatibility (which also makes mcomp's arrow verdict sound: arrows of different lengths can never unify). filter_arrow becomes filter_arrow_n. type_function types all parameters against one arrow, checking expected labels up front to preserve the dedicated Abstract_wrong_label diagnostics; optional-parameter defaults desugar to uniquified *opt_