Skip to content

Commit

Permalink
Support versions below 4.05
Browse files Browse the repository at this point in the history
Signed-off-by: Antal Spector-Zabusky <[email protected]>
  • Loading branch information
antalsz authored and ceastlund committed Aug 10, 2023
1 parent e748f50 commit 95baecb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ast/cinaps/ast_cinaps_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
include StdLabels
include Printf

let capitalize_ascii = Stdppx.String.capitalize_ascii

(* Reexports from [Astlib_cinaps_helpers] *)
let nl = Astlib_cinaps_helpers.nl
let qualified_types = Astlib_cinaps_helpers.qualified_types
let foreach_module = Astlib_cinaps_helpers.foreach_module
Expand Down
2 changes: 1 addition & 1 deletion ast/cinaps/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(library
(name ast_cinaps_helpers)
(libraries supported_version astlib_cinaps_helpers))
(libraries stdppx supported_version astlib_cinaps_helpers))
6 changes: 3 additions & 3 deletions ast/import.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Select_ast (Ocaml : Versions.OCaml_version) = struct
\ : ( Js.Ast.Parsetree.%s,\n\
\ Ocaml.Ast.Parsetree.%s )\n\
\ t\n"
(String.capitalize_ascii s) s s
(capitalize_ascii s) s s
)
*)
| Structure
Expand Down Expand Up @@ -115,7 +115,7 @@ module Select_ast (Ocaml : Versions.OCaml_version) = struct
(*$ foreach_type (fun _ s ->
printf
" | %s -> copy_%s\n"
(String.capitalize_ascii s) s
(capitalize_ascii s) s
)
*)
| Structure -> copy_structure
Expand Down Expand Up @@ -151,7 +151,7 @@ module Select_ast (Ocaml : Versions.OCaml_version) = struct
(*$ foreach_type (fun _ s ->
printf
" | %s -> copy_%s\n"
(String.capitalize_ascii s) s
(capitalize_ascii s) s
)
*)
| Structure -> copy_structure
Expand Down

0 comments on commit 95baecb

Please sign in to comment.