diff options
| author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2013-10-01 03:17:11 +0000 |
|---|---|---|
| committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2013-10-01 03:17:11 +0000 |
| commit | 6ffc859a5cbd3c909337fc678771b6c2b573ec98 (patch) | |
| tree | 671b958e4db4f78331a79c35cf75f39feb39fed8 /ocamldoc | |
| parent | eda1266114bf61f37b9304dc282caa31ddf7ec9f (diff) | |
| download | ocaml-6ffc859a5cbd3c909337fc678771b6c2b573ec98.tar.gz | |
everything works except camlp4
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14204 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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 7a9c86eddb..79eeca8c95 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 aa6dea1281..002504c3d3 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 4ea3521741..21a0394c8a 100644 --- a/ocamldoc/odoc_sig.ml +++ b/ocamldoc/odoc_sig.ml @@ -876,6 +876,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 _ -> @@ -1066,6 +1068,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 @@ -1135,7 +1147,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, "" ) |
