From 47abea3e05021450743756264c392ec5dc07b97c Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Fri, 30 Mar 2018 15:59:00 +0200 Subject: Fix #6257: anomaly with Printing Projections and Context. Constrextern.explicitize expected that if implicits were declared they would be declared at least up to the principal argument of the projection, but Context/discharge of implicits does not preserve this. Note the anomaly only happens with primitive projections DISABLED in recent Coqs (>=8.8). Implicit argument experts may consider whether ensuring enough implicits are declared would be better. --- test-suite/output/Projections.out | 2 ++ test-suite/output/Projections.v | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 test-suite/output/Projections.out create mode 100644 test-suite/output/Projections.v (limited to 'test-suite/output') diff --git a/test-suite/output/Projections.out b/test-suite/output/Projections.out new file mode 100644 index 000000000..e9c28faf1 --- /dev/null +++ b/test-suite/output/Projections.out @@ -0,0 +1,2 @@ +fun S : store => S.(store_funcs) + : store -> host_func diff --git a/test-suite/output/Projections.v b/test-suite/output/Projections.v new file mode 100644 index 000000000..098a518dc --- /dev/null +++ b/test-suite/output/Projections.v @@ -0,0 +1,11 @@ + +Set Printing Projections. + +Class HostFunction := host_func : Type. + +Section store. + Context `{HostFunction}. + Record store := { store_funcs : host_func }. +End store. + +Check (fun (S:@store nat) => S.(store_funcs)). -- cgit v1.2.3