summaryrefslogtreecommitdiffstats
path: root/ocamldoc/odoc_module.ml
diff options
context:
space:
mode:
authorMaxence Guesdon <maxence.guesdon@inria.fr>2004-03-26 15:57:03 +0000
committerMaxence Guesdon <maxence.guesdon@inria.fr>2004-03-26 15:57:03 +0000
commitec84e8f2ec0091a12ca04dc50da9029b32b0dde2 (patch)
tree09d7a3f6e8610b53b5d742a1dd1025fb122396df /ocamldoc/odoc_module.ml
parentdf89e7e0d2d3366ccea1dd0e78ee6f7c7bf7245c (diff)
mod: one section per to module in latex output + improve latex output
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6174 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_module.ml')
-rw-r--r--ocamldoc/odoc_module.ml27
1 files changed, 15 insertions, 12 deletions
diff --git a/ocamldoc/odoc_module.ml b/ocamldoc/odoc_module.ml
index 4714672ca..c3a0a6af9 100644
--- a/ocamldoc/odoc_module.ml
+++ b/ocamldoc/odoc_module.ml
@@ -420,18 +420,21 @@ let rec module_type_is_functor mt =
iter mt.mt_kind
(** The module is a functor if is defined as a functor or if it is an alias for a functor. *)
-let rec module_is_functor m =
- match m.m_kind with
- Module_functor _ -> true
- | Module_alias ma ->
- (
- match ma.ma_module with
- None -> false
- | Some (Mod mo) -> module_is_functor mo
- | Some (Modtype mt) -> module_type_is_functor mt
- )
- | _ -> false
-
+let module_is_functor m =
+ let rec iter = function
+ Module_functor _ -> true
+ | Module_alias ma ->
+ (
+ match ma.ma_module with
+ None -> false
+ | Some (Mod mo) -> iter mo.m_kind
+ | Some (Modtype mt) -> module_type_is_functor mt
+ )
+ | Module_constraint (k, _) ->
+ iter k
+ | _ -> false
+ in
+ iter m.m_kind
(** Returns the list of values of a module type.
@param trans indicates if, for aliased modules, we must perform a transitive search.*)