Package: mlpost / 0.8.1-8

0006-Fix-for-ocamldoc-4.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: Stephane Glondu <steph@glondu.net>
Date: Sun, 10 Nov 2013 19:32:54 +0100
Subject: Fix for ocamldoc >= 4

---
 customdoc/img.ml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/customdoc/img.ml b/customdoc/img.ml
index 31eea9a..6dd316b 100644
--- a/customdoc/img.ml
+++ b/customdoc/img.ml
@@ -1,9 +1,9 @@
-class my_gen =
-  object(self)
-    inherit Odoc_html.html
+module MyGenerator (G : Odoc_html.Html_generator) = struct
+  class html = object(self)
+    inherit G.html
 
     (** Return HTML code for the given text of a bar tag. *)
-    method html_of_img t = 
+    method private html_of_img t =
       match t with 
       | [] -> ""
       | (x::r) ->
@@ -16,11 +16,11 @@ class my_gen =
     initializer
       tag_functions <- ("img", self#html_of_img) :: tag_functions
   end
+end
 
-let my_generator = new my_gen
 let _ = 
-  Odoc_args.set_doc_generator 
-         (Some my_generator :> Odoc_args.doc_generator option) ;
+  Odoc_args.extend_html_generator
+    (module MyGenerator : Odoc_gen.Html_functor);
   (* we need to deactivate the -html option of ocamldoc, otherwise our generator
    * is overwritten by the standard html generator. Ocamlbuild gives the -html
    * option to ocamldoc, so this is really required *)