this repo has no description
1open Types
2module O = Codefmt
3open O.Infix
4
5module Reason = Generator.Make (struct
6 module Obj = struct
7 let close_tag_closed = "}"
8
9 let close_tag_extendable = "}"
10
11 let field_separator = ", "
12
13 let open_tag_closed = "{. "
14
15 let open_tag_extendable = "{.. "
16 end
17
18 module Type = struct
19 let annotation_separator = ": "
20
21 let handle_constructor_params name args = name ++ args
22
23 let handle_substitution_params name args = name ++ args
24
25 let handle_format_params p = O.txt "(" ++ p ++ O.txt ")"
26
27 let type_def_semicolon = true
28
29 let private_keyword = "pri"
30
31 let parenthesize_constructor = true
32
33 module Variant = struct
34 let parenthesize_params = true
35 end
36
37 module Tuple = struct
38 let element_separator = O.txt ", "
39
40 let always_parenthesize = true
41 end
42
43 module Record = struct
44 let field_separator = ","
45 end
46
47 let var_prefix = "'"
48
49 let any = "_"
50
51 let arrow = O.span ~attr:"arrow" (O.txt "=" ++ O.entity "gt")
52
53 module Exception = struct
54 let semicolon = true
55 end
56
57 module GADT = struct
58 let arrow = O.txt ":"
59 end
60
61 module External = struct
62 let semicolon = true
63
64 let handle_primitives prims =
65 List.fold_left
66 (fun acc p ->
67 let str =
68 match acc with [] -> "\"" ^ p ^ "\"" | _ -> " \"" ^ p ^ "\""
69 in
70 inline (Text str) :: acc)
71 [] prims
72 end
73 end
74
75 module Mod = struct
76 let open_tag = O.txt "{"
77
78 let close_tag = O.txt "}"
79
80 let close_tag_semicolon = true
81
82 let include_semicolon = true
83
84 let functor_keyword = false
85
86 let functor_contraction = false
87 end
88
89 module Class = struct
90 let open_tag = O.txt "{"
91
92 let close_tag = O.txt "}"
93 end
94
95 module Value = struct
96 let variable_keyword = "let"
97
98 let semicolon = true
99 end
100
101 module Comment = struct
102 let markers = ("/*", "*/")
103 end
104end)
105
106include Reason