summaryrefslogtreecommitdiff
path: root/typing
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1995-05-30 13:36:40 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1995-05-30 13:36:40 +0000
commite57ef00576936f357c9c5ac339085cbd723176ac (patch)
tree17f9dc6490882df2d77edb00b95ee5c59d422834 /typing
parentb9a3348b4911c4b4910ea8ec2c12ad8eb1e42437 (diff)
downloadocaml-e57ef00576936f357c9c5ac339085cbd723176ac.tar.gz
Remplacement de Cset par Set
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@20 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'typing')
-rw-r--r--typing/ident.ml1
-rw-r--r--typing/predef.ml1
-rw-r--r--typing/printtyp.ml1
-rw-r--r--typing/subst.ml1
-rw-r--r--typing/typecore.ml1
-rw-r--r--typing/typedecl.ml18
-rw-r--r--typing/typedtree.mli1
7 files changed, 12 insertions, 12 deletions
diff --git a/typing/ident.ml b/typing/ident.ml
index 599b855929..fb58f25a7a 100644
--- a/typing/ident.ml
+++ b/typing/ident.ml
@@ -1,4 +1,3 @@
-open Misc
open Format
type t = { mutable stamp: int; name: string; mutable global: bool }
diff --git a/typing/predef.ml b/typing/predef.ml
index 05ea8f1328..07421ffa59 100644
--- a/typing/predef.ml
+++ b/typing/predef.ml
@@ -1,6 +1,5 @@
(* Predefined type constructors (with special typing rules in typecore) *)
-open Misc
open Path
open Typedtree
diff --git a/typing/printtyp.ml b/typing/printtyp.ml
index cd6d48287a..a898b8c03e 100644
--- a/typing/printtyp.ml
+++ b/typing/printtyp.ml
@@ -1,7 +1,6 @@
(* Printing functions *)
open Format
-open Misc
open Longident
open Path
open Asttypes
diff --git a/typing/subst.ml b/typing/subst.ml
index b888ceee8c..97a5aab938 100644
--- a/typing/subst.ml
+++ b/typing/subst.ml
@@ -1,6 +1,5 @@
(* Substitutions *)
-open Misc
open Path
open Typedtree
diff --git a/typing/typecore.ml b/typing/typecore.ml
index bc3a909efc..e41e0ebfa3 100644
--- a/typing/typecore.ml
+++ b/typing/typecore.ml
@@ -1,6 +1,5 @@
(* Typechecking for the core language *)
-open Misc
open Asttypes
open Parsetree
open Typedtree
diff --git a/typing/typedecl.ml b/typing/typedecl.ml
index ef25c83153..453bd6ecc8 100644
--- a/typing/typedecl.ml
+++ b/typing/typedecl.ml
@@ -30,6 +30,12 @@ let rec enter_types env = function
(* Translate one type declaration *)
+module StringSet =
+ Set.Make(struct
+ type t = string
+ let compare = compare
+ end)
+
let transl_declaration env (name, sdecl) id =
Ctype.begin_def();
reset_type_variables();
@@ -45,12 +51,12 @@ let transl_declaration env (name, sdecl) id =
| Ptype_manifest sty ->
Type_manifest(transl_simple_type env true sty)
| Ptype_variant cstrs ->
- let all_constrs = ref Cset.empty in
+ let all_constrs = ref StringSet.empty in
List.iter
(fun (name, args) ->
- if Cset.mem name !all_constrs then
+ if StringSet.mem name !all_constrs then
raise(Error(sdecl.ptype_loc, Duplicate_constructor name));
- all_constrs := Cset.add name !all_constrs)
+ all_constrs := StringSet.add name !all_constrs)
cstrs;
if List.length cstrs > Config.max_tag then
raise(Error(sdecl.ptype_loc, Too_many_constructors));
@@ -59,12 +65,12 @@ let transl_declaration env (name, sdecl) id =
(name, List.map (transl_simple_type env true) args))
cstrs)
| Ptype_record lbls ->
- let all_labels = ref Cset.empty in
+ let all_labels = ref StringSet.empty in
List.iter
(fun (name, mut, arg) ->
- if Cset.mem name !all_labels then
+ if StringSet.mem name !all_labels then
raise(Error(sdecl.ptype_loc, Duplicate_label name));
- all_labels := Cset.add name !all_labels)
+ all_labels := StringSet.add name !all_labels)
lbls;
Type_record(List.map
(fun (name, mut, arg) ->
diff --git a/typing/typedtree.mli b/typing/typedtree.mli
index 976feb4964..fc572cd244 100644
--- a/typing/typedtree.mli
+++ b/typing/typedtree.mli
@@ -1,6 +1,5 @@
(* Abstract syntax tree after typing *)
-open Misc
open Asttypes
(* Type expressions for the core language *)