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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module Html = Tyxml.Html
open Utils
module ML = Generator.Make (struct
module Obj =
struct
let close_tag_closed = ">"
let close_tag_extendable = ".. >"
let field_separator = "; "
let open_tag_closed = "< "
let open_tag_extendable = "< "
end
module Type =
struct
let annotation_separator = " : "
let handle_params name args =
if args <> [ Html.txt "" ]
then [Html.span (args @ [ Html.txt " " ] @ name)]
else name
let handle_constructor_params = handle_params
let handle_substitution_params = handle_params
let handle_format_params p = p
let type_def_semicolon = false
let private_keyword = "private"
let parenthesize_constructor = false
module Variant =
struct
let parenthesize_params = false
end
module Tuple =
struct
let element_separator = " * "
let always_parenthesize = false
end
module Record =
struct
let field_separator = ";"
end
let var_prefix = "'"
let any = "_"
let arrow = Html.span [Html.entity "#45"; Html.entity "gt"]
module Exception =
struct
let semicolon = false
end
module GADT =
struct
let arrow = arrow
end
module External =
struct
let semicolon = false
let handle_primitives prims =
List.map (fun p -> Html.txt ("\"" ^ p ^ "\" ")) prims
end
end
module Mod =
struct
let open_tag = Generator.keyword "sig"
let close_tag = Generator.keyword "end"
let close_tag_semicolon = false
let include_semicolon = false
let functor_keyword = true
end
module Class =
struct
let open_tag = Generator.keyword "object"
let close_tag = Generator.keyword "end"
end
module Value =
struct
let variable_keyword = "val"
let semicolon = false
end
end)
include ML.Page