diff options
| author | Pierre-Marie Pédrot | 2015-12-17 14:05:49 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2015-12-17 14:05:49 +0100 |
| commit | d83e8aceaca972f8997f208e46d257e69c2e352d (patch) | |
| tree | d5efe63774ddc8c134b7e50748f15a77e870f133 /plugins/extraction/modutil.ml | |
| parent | f24543a02db80e2c4ab3065564fabb9b7d485a2f (diff) | |
| parent | 04394d4f17bff1739930ddca5d31cb9bb031078b (diff) | |
Merge branch 'v8.5'
Diffstat (limited to 'plugins/extraction/modutil.ml')
| -rw-r--r-- | plugins/extraction/modutil.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/extraction/modutil.ml b/plugins/extraction/modutil.ml index e8383bda59..c3dc286cd1 100644 --- a/plugins/extraction/modutil.ml +++ b/plugins/extraction/modutil.ml @@ -269,7 +269,7 @@ let rec optim_se top to_appear s = function let a = normalize (ast_glob_subst !s a) in let i = inline r a in if i then s := Refmap'.add r a !s; - let d = match optimize_fix a with + let d = match dump_unused_vars (optimize_fix a) with | MLfix (0, _, [|c|]) -> Dfix ([|r|], [|ast_subst (MLglob r) c|], [|t|]) | a -> Dterm (r, a, t) @@ -283,7 +283,8 @@ let rec optim_se top to_appear s = function if inline rv.(i) fake_body then s := Refmap'.add rv.(i) (dfix_to_mlfix rv av i) !s done; - (l,SEdecl (Dfix (rv, av, tv))) :: (optim_se top to_appear s lse) + let av' = Array.map dump_unused_vars av in + (l,SEdecl (Dfix (rv, av', tv))) :: (optim_se top to_appear s lse) | (l,SEmodule m) :: lse -> let m = { m with ml_mod_expr = optim_me to_appear s m.ml_mod_expr} in (l,SEmodule m) :: (optim_se top to_appear s lse) |
