From 1c8876ad44b27dcf2610085d0fec6e3953aa882c Mon Sep 17 00:00:00 2001 From: Drup Date: Tue, 26 Apr 2016 14:49:01 +0200 Subject: [PATCH] Fixes for 4.03. --- src/indexBuild.ml | 8 ++++++-- src/indexOut.ml | 4 ++-- src/indexPredefined.ml | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/indexBuild.ml b/src/indexBuild.ml index 72115e1..d7a58ac 100644 --- a/src/indexBuild.ml +++ b/src/indexBuild.ml @@ -221,6 +221,7 @@ let qualify_ty (parents:parents) ty = | Otyp_module (str, strl, tylist) -> Otyp_module (str, strl, List.map aux tylist) | Otyp_open -> Otyp_open + | Otyp_attribute (ty,attr) -> Otyp_attribute (aux ty, attr) in aux ty @@ -233,7 +234,7 @@ let qualify_ty_in_sig_item (parents:parents) = otype_type = qual out_type_decl.otype_type; otype_cstrs = List.map (fun (ty1,ty2) -> qual ty1, qual ty2) out_type_decl.otype_cstrs }, rc) - | Osig_value (str, ty, str2) -> Osig_value (str, qual ty, str2) + | Osig_value o -> Osig_value {o with oval_type = qual o.oval_type} | Osig_typext (constr, es) -> Osig_typext ({ constr with oext_args = List.map qual constr.oext_args }, es) @@ -303,7 +304,7 @@ let doc_of_attributes attrs = match List.find (fun ({Location.txt},_) -> txt = doc_loc_id) attrs with | _, PStr [{pstr_desc = Pstr_eval ({pexp_desc},_)}] -> (match pexp_desc with - | Pexp_constant (Const_string (s,_)) -> Some s + | Pexp_constant (Pconst_string (s,_)) -> Some s | _ -> debug "Unexpected ocaml.doc docstring format"; None) | _ -> None | exception Not_found -> None @@ -322,6 +323,7 @@ let trie_of_type_decl ?comments info ty_decl = otype_params = []; otype_type = ty; otype_private = Asttypes.Public; + otype_immediate = false ; otype_cstrs = []; }, Outcometree.Orec_not) in let doc = doc_of_attributes ld_attributes in @@ -365,6 +367,7 @@ let trie_of_type_decl ?comments info ty_decl = otype_params = []; otype_type = params; otype_private = Asttypes.Public; + otype_immediate = false ; otype_cstrs = []; }, Outcometree.Orec_not) in let doc = doc_of_attributes cd_attributes in @@ -530,6 +533,7 @@ let rec trie_of_sig_item otype_params = []; otype_type = ty; otype_private = Asttypes.Public; + otype_immediate = false ; otype_cstrs = []; }, Outcometree.Orec_not) in Trie.add t (string_to_key lbl) diff --git a/src/indexOut.ml b/src/indexOut.ml index 90b2e72..1b0600d 100644 --- a/src/indexOut.ml +++ b/src/indexOut.ml @@ -181,8 +181,8 @@ module IndexFormat = struct !Oprint.out_module_type fmt mtyp | Osig_type ({ otype_type },_) -> tydecl fmt otype_type - | Osig_value (_,ty,_) -> - !Oprint.out_type fmt ty + | Osig_value {oval_type} -> + !Oprint.out_type fmt oval_type | Osig_ellipsis -> Format.fprintf fmt "..." diff --git a/src/indexPredefined.ml b/src/indexPredefined.ml index 974adf3..a7276cd 100644 --- a/src/indexPredefined.ml +++ b/src/indexPredefined.ml @@ -28,6 +28,7 @@ let mktype name ?(params=[]) ?(def=Otyp_abstract) doc = { otype_params = List.map (fun v -> v,(true,true)) params; otype_type = def; otype_private = Asttypes.Public; + otype_immediate = false ; otype_cstrs = [] }, Orec_not)); loc_sig = Lazy.from_val Location.none; loc_impl = Lazy.from_val Location.none; @@ -46,6 +47,7 @@ let mkvariant name parent params = { otype_type = (match params with [] -> Otyp_sum [] | l -> Otyp_tuple l); otype_private = Asttypes.Public; + otype_immediate = false ; otype_cstrs = [] }, Orec_not)); loc_sig = Lazy.from_val Location.none; loc_impl = Lazy.from_val Location.none;