From ec84e8f2ec0091a12ca04dc50da9029b32b0dde2 Mon Sep 17 00:00:00 2001 From: Maxence Guesdon Date: Fri, 26 Mar 2004 15:57:03 +0000 Subject: 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 --- ocamldoc/odoc_module.ml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'ocamldoc/odoc_module.ml') 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.*) -- cgit v1.2.3-70-g09d2