From 37195c027472b7f0110249b28356271e713fee6f Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Mon, 22 Aug 2016 14:39:10 +0200 Subject: More efficient implementation of map_named_val. --- kernel/environ.ml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'kernel/environ.ml') diff --git a/kernel/environ.ml b/kernel/environ.ml index be3b4977e..f4a3312ef 100644 --- a/kernel/environ.ml +++ b/kernel/environ.ml @@ -105,12 +105,7 @@ let named_vals_of_val c = c.env_named_val (* [map_named_val f ctxt] apply [f] to the body and the type of each declarations. *** /!\ *** [f t] should be convertible with t *) -let rec map_named_val f ctx = match match_named_context_val ctx with -| None -> empty_named_context_val -| Some (d, v, ctx) -> - let d = Context.Named.Declaration.map_constr f d in - let ctx = map_named_val f ctx in - push_named_context_val_val d v ctx +let map_named_val = map_named_val let empty_named_context = Context.Named.empty -- cgit v1.2.3