summaryrefslogtreecommitdiffstats
path: root/ocamldoc/odoc_sig.ml
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2014-01-10 07:53:33 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2014-01-10 07:53:33 +0000
commit3b4d7cf63b889b86c33efcbbe79f9937b663b9f6 (patch)
treebefe14b04b00480f16f1b79de58f38eba00936f4 /ocamldoc/odoc_sig.ml
parent4a25508fc253019e936460396328b22554f83050 (diff)
parentd90b126bd428999d767ef4db4c5d3b05eb27c345 (diff)
Merge module-alias branch (cf. PR#6063)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14394 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_sig.ml')
-rw-r--r--ocamldoc/odoc_sig.ml15
1 files changed, 14 insertions, 1 deletions
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, "" )