diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2012-12-17 03:18:31 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2012-12-17 03:18:31 +0000 |
commit | 1430e90e89240309b1aea3a7ddd0270bb16707b8 (patch) | |
tree | 9a4e7bcb5cf637556ada3e48530a2a756d27539e | |
parent | 6a55d4f552897722775d93fdd8fb03996427b6cd (diff) | |
download | ocaml-1430e90e89240309b1aea3a7ddd0270bb16707b8.tar.gz |
shorten paths in annot + lookup abbreviations in persistent structuresshort-paths
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@13132 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | typing/env.ml | 7 | ||||
-rw-r--r-- | typing/printtyp.ml | 2 | ||||
-rw-r--r-- | typing/stypes.ml | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/typing/env.ml b/typing/env.ml index 2cd877fbd2..9f61482249 100644 --- a/typing/env.ml +++ b/typing/env.ml @@ -692,6 +692,13 @@ let iter_env proj1 proj2 f env = comps.comp_components | Functor_comps _ -> () in + Hashtbl.iter + (fun s pso -> + match pso with None -> () + | Some ps -> + let id = Pident (Ident.create_persistent s) in + iter_components id id ps.ps_comps) + persistent_structures; Ident.iter (fun id ((path, comps), _) -> iter_components (Pident id) path comps) env.components diff --git a/typing/printtyp.ml b/typing/printtyp.ml index 04fc0ee7b1..b5ea284634 100644 --- a/typing/printtyp.ml +++ b/typing/printtyp.ml @@ -229,7 +229,7 @@ let rec normalize_type_path ?(cache=false) env p = begin match repr ty with {desc = Tconstr (p1, tyl, _)} -> let tyl = List.map repr tyl in - if List.length desc.type_params = List.length tyl + if List.length params = List.length tyl && List.for_all2 (==) params tyl then normalize_type_path ~cache env p1 else if cache || List.length params <= List.length tyl diff --git a/typing/stypes.ml b/typing/stypes.ml index 49f0e89590..0e67340f68 100644 --- a/typing/stypes.ml +++ b/typing/stypes.ml @@ -156,8 +156,6 @@ let get_info () = let dump filename = if !Clflags.annotations then begin - let real = !Clflags.real_paths in - Clflags.real_paths := true; let info = get_info () in let pp = match filename with @@ -166,7 +164,6 @@ let dump filename = sort_filter_phrases (); ignore (List.fold_left (print_info pp) Location.none info); phrases := []; - Clflags.real_paths := real end else begin annotations := []; end; |