summaryrefslogtreecommitdiff
path: root/ocamldoc/odoc_print.ml
diff options
context:
space:
mode:
authorThomas Refis <thomas.refis@gmail.com>2019-09-02 11:43:26 +0100
committerThomas Refis <thomas.refis@gmail.com>2019-09-11 13:44:31 -0400
commit6f492fdbd9c352c0502c118a80d451b8867b1dae (patch)
tree7957c84f5a7425a87a8aaa99f261f18750daec3f /ocamldoc/odoc_print.ml
parentf814450b605852429613e4ae7f68bac0382e3f1d (diff)
downloadocaml-pr8908.tar.gz
PR#8908: used as a base for other PRs.pr8908
Diffstat (limited to 'ocamldoc/odoc_print.ml')
-rw-r--r--ocamldoc/odoc_print.ml14
1 files changed, 8 insertions, 6 deletions
diff --git a/ocamldoc/odoc_print.ml b/ocamldoc/odoc_print.ml
index 1c660d3e0c..5612e5b7e3 100644
--- a/ocamldoc/odoc_print.ml
+++ b/ocamldoc/odoc_print.ml
@@ -52,18 +52,20 @@ exception Use_code of string
than the "emptied" type.
*)
let simpl_module_type ?code t =
+ let open Types in
let rec iter t =
match t with
- Types.Mty_ident _
- | Types.Mty_alias _ -> t
- | Types.Mty_signature _ ->
+ Mty_ident _
+ | Mty_alias _ -> t
+ | Mty_signature _ ->
(
match code with
- None -> Types.Mty_signature []
+ None -> Mty_signature []
| Some s -> raise (Use_code s)
)
- | Types.Mty_functor (id, mt1, mt2) ->
- Types.Mty_functor (id, Option.map iter mt1, iter mt2)
+ | Mty_functor (Unit, mt) -> Mty_functor (Unit, iter mt)
+ | Mty_functor (Named (name, mt1), mt2) ->
+ Mty_functor (Named (name, iter mt1), iter mt2)
in
iter t