Skip to content

Commit

Permalink
Merge pull request #85 from Drup/4.03
Browse files Browse the repository at this point in the history
Fixes for 4.03.
  • Loading branch information
AltGr committed Apr 29, 2016
2 parents 07a7853 + 1c8876a commit cdfb0ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/indexBuild.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/indexOut.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "..."

Expand Down
2 changes: 2 additions & 0 deletions src/indexPredefined.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit cdfb0ec

Please sign in to comment.