From bb64d76f9fe80ecdef4f09c797914022783ccb80 Mon Sep 17 00:00:00 2001 From: Kazuhiko Sakaguchi Date: Thu, 25 Jul 2019 20:09:28 +0200 Subject: Fix #7348: extraction of dependent record projections - Inline record projections by default (except for Haskell extraction). - Extend `pp_record_proj` for record projections involving `MLmagic`. - Remove special treatments for pretty-printing for record projections other than `pp_record_proj`. - `micromega.ml` had to be changed due to this change of the extraction plugin. Acknowledgement: This work is financially supported by Peano System Inc. on-behalf-of: @peano-system --- plugins/extraction/extraction.ml | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'plugins/extraction/extraction.ml') diff --git a/plugins/extraction/extraction.ml b/plugins/extraction/extraction.ml index 78c6255c1e..cca212f332 100644 --- a/plugins/extraction/extraction.ml +++ b/plugins/extraction/extraction.ml @@ -754,18 +754,6 @@ and extract_cst_app env sg mle mlt kn args = let la = List.length args in (* The ml arguments, already expunged from known logical ones *) let mla = make_mlargs env sg mle s args metas in - let mla = - if magic1 || lang () != Ocaml then mla - else - try - (* for better optimisations later, we discard dependent args - of projections and replace them by fake args that will be - removed during final pretty-print. *) - let l,l' = List.chop (projection_arity (GlobRef.ConstRef kn)) mla in - if not (List.is_empty l') then (List.map (fun _ -> MLexn "Proj Args") l) @ l' - else mla - with e when CErrors.noncritical e -> mla - in (* For strict languages, purely logical signatures lead to a dummy lam (except when [Kill Ktype] everywhere). So a [MLdummy] is left accordingly. *) -- cgit v1.2.3