~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to ocamldoc/odoc_latex.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Zacchiroli
  • Date: 2009-02-22 08:49:13 UTC
  • mfrom: (12.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090222084913-3i0uw2bhd0lgw0ok
* Uploading to unstable
* debian/control: bump dh-ocaml to (>= 0.4) to avoid buggy ocamlinit.mk

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
(*                                                                     *)
10
10
(***********************************************************************)
11
11
 
12
 
(* $Id: odoc_latex.ml,v 1.40 2006/09/20 11:14:37 doligez Exp $ *)
 
12
(* $Id: odoc_latex.ml,v 1.41 2007/10/09 10:29:36 weis Exp $ *)
13
13
 
14
14
(** Generation of LaTeX documentation. *)
15
15
 
474
474
        self#latex_of_type_params fmt2 mod_name t;
475
475
        (match t.ty_parameters with [] -> () | _ -> ps fmt2 " ");
476
476
        ps fmt2 s_name;
 
477
        let priv = t.ty_private = Asttypes.Private in
477
478
        (
478
479
         match t.ty_manifest with
479
480
           None -> ()
480
481
         | Some typ ->
481
 
             p fmt2 " = %s" (self#normal_type mod_name typ)
 
482
             p fmt2 " = %s%s" (if priv then "private " else "") (self#normal_type mod_name typ)
482
483
        );
483
484
        let s_type3 =
484
485
          p fmt2
486
487
            (
487
488
             match t.ty_kind with
488
489
               Type_abstract -> ""
489
 
             | Type_variant (_, priv) -> "="^(if priv then " private" else "")
490
 
             | Type_record (_, priv) -> "= "^(if priv then "private " else "")^"{"
 
490
             | Type_variant _ -> "="^(if priv then " private" else "")
 
491
             | Type_record _ -> "= "^(if priv then "private " else "")^"{"
491
492
            ) ;
492
493
          flush2 ()
493
494
        in
495
496
        let defs =
496
497
          match t.ty_kind with
497
498
            Type_abstract -> []
498
 
          | Type_variant (l, _) ->
 
499
          | Type_variant l ->
499
500
              (List.flatten
500
501
               (List.map
501
502
                  (fun constr ->
527
528
                  l
528
529
               )
529
530
              )
530
 
          | Type_record (l, _) ->
 
531
          | Type_record l ->
531
532
              (List.flatten
532
533
                 (List.map
533
534
                    (fun r ->