Skip to content

Commit 18ca331

Browse files
committed
Replace private module with inline open in generated code.
1 parent 0118f4a commit 18ca331

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ppx_regexp/ppx_regexp.ml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(* Copyright (C) 2017--2022 Petter A. Urkedal <[email protected]>
1+
(* Copyright (C) 2017--2023 Petter A. Urkedal <[email protected]>
22
*
33
* This library is free software; you can redistribute it and/or modify it
44
* under the terms of the GNU Lesser General Public License as published by
@@ -227,11 +227,7 @@ let impl str =
227227
if rev_bindings = [] then str else
228228
let re_str =
229229
let loc = Location.none in
230-
[%str
231-
module Ppx_regexp__local = struct
232-
[%%i pstr_value ~loc Nonrecursive rev_bindings]
233-
end
234-
open Ppx_regexp__local]
230+
[%str open (struct [%%i pstr_value ~loc Nonrecursive rev_bindings] end)]
235231
in
236232
re_str @ str
237233

0 commit comments

Comments
 (0)