diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-08-22 14:39:10 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-09-09 12:03:25 +0200 |
commit | 37195c027472b7f0110249b28356271e713fee6f (patch) | |
tree | 26eeac7ec60bd309d26c673462e369c0239652b7 /kernel/environ.ml | |
parent | 76370ea2ddc2c09485f02c86798914a6d4cf5523 (diff) |
More efficient implementation of map_named_val.
Diffstat (limited to 'kernel/environ.ml')
-rw-r--r-- | kernel/environ.ml | 7 |
1 files changed, 1 insertions, 6 deletions
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 |