summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2010-04-06 10:09:57 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2010-04-06 10:09:57 +0000
commitffc4896d4087aff71fc30dc44fb62684fb15d581 (patch)
treef0dae6c57eca374ab22526f910e03985c912cb04
parent04b328aa9d4b94437342507106f3dca33260204c (diff)
downloadocaml-sigsubst.tar.gz
revert c9634: no need to modify env.mlsigsubst
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/sigsubst@10233 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--typing/env.ml24
1 files changed, 1 insertions, 23 deletions
diff --git a/typing/env.ml b/typing/env.ml
index c7bcb61daa..0442479906 100644
--- a/typing/env.ml
+++ b/typing/env.ml
@@ -739,32 +739,10 @@ let add_item comp env =
| Tsig_class(id, decl, _) -> add_class id decl env
| Tsig_cltype(id, decl, _) -> add_cltype id decl env
-(* Remove a previous identifier with same name *)
-let rec filter_value id = function
- Env_empty -> Env_empty
- | Env_value (sum, id', vd) ->
- if Ident.equal id id' then sum
- else Env_value(filter_value id sum, id', vd)
- | Env_type (sum, id', td) -> Env_type (filter_value id sum, id', td)
- | Env_exception (sum, id', ed) -> Env_exception (filter_value id sum, id', ed)
- | Env_module (sum, id', mty) -> Env_module (filter_value id sum, id', mty)
- | Env_modtype (sum, id', mty) -> Env_modtype (filter_value id sum, id', mty)
- | Env_class (sum, id', cty) -> Env_class (filter_value id sum, id', cty)
- | Env_cltype (sum, id', cty) -> Env_cltype (filter_value id sum, id', cty)
- | Env_open (sum, path) -> Env_open (filter_value id sum, path)
-
-let remove_value id env =
- { env with summary = filter_value id env.summary }
-
-let add_item_for_signature comp env =
- match comp with
- Tsig_value(id, decl) -> add_value id decl (remove_value id env)
- | _ -> add_item comp env
-
let rec add_signature sg env =
match sg with
[] -> env
- | comp :: rem -> add_signature rem (add_item_for_signature comp env)
+ | comp :: rem -> add_signature rem (add_item comp env)
(* Open a signature path *)