diff options
Diffstat (limited to 'ocamldoc')
-rw-r--r-- | ocamldoc/odoc_env.ml | 1 | ||||
-rw-r--r-- | ocamldoc/odoc_print.ml | 1 | ||||
-rw-r--r-- | ocamldoc/odoc_sig.ml | 15 |
3 files changed, 16 insertions, 1 deletions
diff --git a/ocamldoc/odoc_env.ml b/ocamldoc/odoc_env.ml index d55ace84c..02d1e3a21 100644 --- a/ocamldoc/odoc_env.ml +++ b/ocamldoc/odoc_env.ml @@ -220,6 +220,7 @@ let subst_module_type env t = Types.Mty_ident p -> let new_p = Odoc_name.to_path (full_module_type_name env (Odoc_name.from_path p)) in Types.Mty_ident new_p + | Types.Mty_alias _ | Types.Mty_signature _ -> t | Types.Mty_functor (id, mt1, mt2) -> diff --git a/ocamldoc/odoc_print.ml b/ocamldoc/odoc_print.ml index d6b56f395..3fa826af9 100644 --- a/ocamldoc/odoc_print.ml +++ b/ocamldoc/odoc_print.ml @@ -55,6 +55,7 @@ let simpl_module_type ?code t = let rec iter t = match t with Types.Mty_ident p -> t + | Types.Mty_alias p -> t | Types.Mty_signature _ -> ( match code with diff --git a/ocamldoc/odoc_sig.ml b/ocamldoc/odoc_sig.ml index 93f0193e5..627938453 100644 --- a/ocamldoc/odoc_sig.ml +++ b/ocamldoc/odoc_sig.ml @@ -870,6 +870,8 @@ module Analyser = let rec f = function Parsetree.Pmty_ident longident -> Name.from_longident longident.txt + | Parsetree.Pmty_alias longident -> + Name.from_longident longident.txt | Parsetree.Pmty_signature _ -> "??" | Parsetree.Pmty_functor _ -> @@ -1060,6 +1062,16 @@ module Analyser = Module_type_alias { mta_name = Odoc_env.full_module_type_name env name ; mta_module = None } + | Parsetree.Pmty_alias longident -> + let name = + match sig_module_type with + Types.Mty_alias path -> Name.from_path path + | _ -> Name.from_longident longident.txt + in + (* Wrong naming... *) + Module_type_alias { mta_name = Odoc_env.full_module_name env name ; + mta_module = None } + | Parsetree.Pmty_signature ast -> ( let ast = filter_out_erased_items_from_signature erased ast in @@ -1136,7 +1148,8 @@ module Analyser = and analyse_module_kind ?(erased = Name.Set.empty) env current_module_name module_type sig_module_type = match module_type.Parsetree.pmty_desc with - Parsetree.Pmty_ident longident -> + Parsetree.Pmty_ident longident + | Parsetree.Pmty_alias longident -> let k = analyse_module_type_kind env current_module_name module_type sig_module_type in Module_with ( k, "" ) |