@@ -98,33 +98,57 @@ module Default = struct
98
98
failwith
99
99
" Ppxlib.Ast_builder.nonrec_type_declaration: don't use this function"
100
100
101
- let eint ~loc t = pexp_constant ~loc (Pconst_integer (Int. to_string t, None ))
102
- let echar ~loc t = pexp_constant ~loc (Pconst_char t)
103
- let estring ~loc t = pexp_constant ~loc (Pconst_string (t, loc, None ))
104
- let efloat ~loc t = pexp_constant ~loc (Pconst_float (t, None ))
101
+ let eint ~loc t =
102
+ pexp_constant ~loc
103
+ (Ast_helper.Const. mk ~loc @@ Pconst_integer (Int. to_string t, None ))
104
+
105
+ let echar ~loc t =
106
+ pexp_constant ~loc (Ast_helper.Const. mk ~loc @@ Pconst_char t)
107
+
108
+ let estring ~loc t =
109
+ pexp_constant ~loc (Ast_helper.Const. mk ~loc @@ Pconst_string (t, loc, None ))
110
+
111
+ let efloat ~loc t =
112
+ pexp_constant ~loc (Ast_helper.Const. mk ~loc @@ Pconst_float (t, None ))
105
113
106
114
let eint32 ~loc t =
107
- pexp_constant ~loc (Pconst_integer (Int32. to_string t, Some 'l' ))
115
+ pexp_constant ~loc
116
+ (Ast_helper.Const. mk ~loc @@ Pconst_integer (Int32. to_string t, Some 'l' ))
108
117
109
118
let eint64 ~loc t =
110
- pexp_constant ~loc (Pconst_integer (Int64. to_string t, Some 'L' ))
119
+ pexp_constant ~loc
120
+ (Ast_helper.Const. mk ~loc @@ Pconst_integer (Int64. to_string t, Some 'L' ))
111
121
112
122
let enativeint ~loc t =
113
- pexp_constant ~loc (Pconst_integer (Nativeint. to_string t, Some 'n' ))
123
+ pexp_constant ~loc
124
+ (Ast_helper.Const. mk ~loc
125
+ @@ Pconst_integer (Nativeint. to_string t, Some 'n' ))
126
+
127
+ let pint ~loc t =
128
+ ppat_constant ~loc
129
+ (Ast_helper.Const. mk ~loc @@ Pconst_integer (Int. to_string t, None ))
130
+
131
+ let pchar ~loc t =
132
+ ppat_constant ~loc (Ast_helper.Const. mk ~loc @@ Pconst_char t)
133
+
134
+ let pstring ~loc t =
135
+ ppat_constant ~loc (Ast_helper.Const. mk ~loc @@ Pconst_string (t, loc, None ))
114
136
115
- let pint ~loc t = ppat_constant ~loc (Pconst_integer (Int. to_string t, None ))
116
- let pchar ~loc t = ppat_constant ~loc (Pconst_char t)
117
- let pstring ~loc t = ppat_constant ~loc (Pconst_string (t, loc, None ))
118
- let pfloat ~loc t = ppat_constant ~loc (Pconst_float (t, None ))
137
+ let pfloat ~loc t =
138
+ ppat_constant ~loc (Ast_helper.Const. mk ~loc @@ Pconst_float (t, None ))
119
139
120
140
let pint32 ~loc t =
121
- ppat_constant ~loc (Pconst_integer (Int32. to_string t, Some 'l' ))
141
+ ppat_constant ~loc
142
+ (Ast_helper.Const. mk ~loc @@ Pconst_integer (Int32. to_string t, Some 'l' ))
122
143
123
144
let pint64 ~loc t =
124
- ppat_constant ~loc (Pconst_integer (Int64. to_string t, Some 'L' ))
145
+ ppat_constant ~loc
146
+ (Ast_helper.Const. mk ~loc @@ Pconst_integer (Int64. to_string t, Some 'L' ))
125
147
126
148
let pnativeint ~loc t =
127
- ppat_constant ~loc (Pconst_integer (Nativeint. to_string t, Some 'n' ))
149
+ ppat_constant ~loc
150
+ (Ast_helper.Const. mk ~loc
151
+ @@ Pconst_integer (Nativeint. to_string t, Some 'n' ))
128
152
129
153
let ebool ~loc t =
130
154
pexp_construct ~loc (Located. lident ~loc (Bool. to_string t)) None
0 commit comments