diff options
| author | Enrico Tassi | 2019-12-28 09:48:11 +0100 |
|---|---|---|
| committer | Enrico Tassi | 2019-12-28 09:48:11 +0100 |
| commit | f403262aaa9ebe5cf518561875c3a46da83a98b6 (patch) | |
| tree | afbb1b82a304e327d4b903e006dae155b6f9011b /pretyping | |
| parent | 9c74438f09c2dddaa320eccf4d0842c77e3c863d (diff) | |
| parent | 471400e724317963983a0670a4c3437b1dcc61d5 (diff) | |
Merge PR #10747: Extend `Print Canonical Projections` with a search functionality
Reviewed-by: CohenCyril
Ack-by: SkySkimmer
Reviewed-by: ejgallego
Diffstat (limited to 'pretyping')
| -rw-r--r-- | pretyping/recordops.ml | 11 | ||||
| -rw-r--r-- | pretyping/recordops.mli | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/pretyping/recordops.ml b/pretyping/recordops.ml index 5b416a99f9..35e182840b 100644 --- a/pretyping/recordops.ml +++ b/pretyping/recordops.ml @@ -114,7 +114,7 @@ let find_primitive_projection c = (* the effective components of a structure and the projections of the *) (* structure *) -(* Table des definitions "object" : pour chaque object c, +(* Table of "object" definitions: for each object c, c := [x1:B1]...[xk:Bk](Build_R a1...am t1...t_n) @@ -127,16 +127,19 @@ let find_primitive_projection c = that maps the pair (Li,ci) to the following data + o_ORIGIN = c (the constant name which this conversion rule is + synthesized from) o_DEF = c o_TABS = B1...Bk o_INJ = Some n (when ci is a reference to the parameter xi) - o_PARAMS = a1...am - o_NARAMS = m + o_TPARAMS = a1...am + o_NPARAMS = m o_TCOMP = ui1...uir *) type obj_typ = { + o_ORIGIN : Constant.t; o_DEF : constr; o_CTX : Univ.AUContext.t; o_INJ : int option; (* position of trivial argument if any *) @@ -224,7 +227,7 @@ let compute_canonical_projections env ~warn (con,ind) = match cs_pattern_of_constr nenv t with | patt, o_INJ, o_TCOMPS -> ((GlobRef.ConstRef proji_sp, (patt, t)), - { o_DEF ; o_CTX ; o_INJ ; o_TABS ; o_TPARAMS ; o_NPARAMS ; o_TCOMPS }) + { o_ORIGIN = con ; o_DEF ; o_CTX ; o_INJ ; o_TABS ; o_TPARAMS ; o_NPARAMS ; o_TCOMPS }) :: acc | exception Not_found -> if warn then warn_projection_no_head_constant (sign, env, t, con, proji_sp); diff --git a/pretyping/recordops.mli b/pretyping/recordops.mli index e8b0d771aa..aaba7cc3e5 100644 --- a/pretyping/recordops.mli +++ b/pretyping/recordops.mli @@ -73,6 +73,7 @@ type cs_pattern = | Default_cs type obj_typ = { + o_ORIGIN : Constant.t; o_DEF : constr; o_CTX : Univ.AUContext.t; o_INJ : int option; (** position of trivial argument *) |
