From c83fa10156545bce96ef4a0f93e8695ec353c834 Mon Sep 17 00:00:00 2001 From: Gabriel Scherer Date: Tue, 30 Jun 2015 18:06:06 +0200 Subject: minor: comment on the meaning of the 'boolean' variable --- interp/constrintern.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'interp') diff --git a/interp/constrintern.ml b/interp/constrintern.ml index 56a191262c..5c5a900fba 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -1081,11 +1081,10 @@ let sort_fields ~complete loc fields completer = begin match proj_kinds with | [] -> anomaly (Pp.str "Number of projections mismatch") | (_, regular) :: proj_kinds -> + (* "regular" is false when the field is defined + by a let-in in the record declaration + (its value is fixed from other fields). *) if first_field && not regular && complete then - (* G.S.: why do we fail only in the - first-field case? I would expect to fail - whenever (not regular && complete), and - skip the fields only when (not complete *) user_err_loc (loc, "", str "No local fields allowed in a record construction.") else if first_field then build_proj_list projs proj_kinds (idx+1) ~acc_first_idx:idx acc -- cgit v1.2.3