From e7bc884d262358a38155fb0cb7b41ee6a2299576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dimino?= Date: Sun, 8 Jul 2018 15:26:18 +0100 Subject: [PATCH] Improve compatibility of Configurator.V1.write_flags (#967) Make sure the produced file will round-trip with both the Dune and Jbuilder lexical conventions. Signed-off-by: Jeremie Dimino --- src/configurator/v1.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurator/v1.ml b/src/configurator/v1.ml index 149d3e78..1f11d417 100644 --- a/src/configurator/v1.ml +++ b/src/configurator/v1.ml @@ -487,7 +487,7 @@ end let write_flags fname s = let path = Path.in_source fname in - let sexp = Usexp.List(List.map ~f:Usexp.atom_or_quoted_string s) in + let sexp = Usexp.List (List.map s ~f:(fun s -> Usexp.Quoted_string s)) in Io.write_file path (Usexp.to_string sexp ~syntax:Dune) let main ?(args=[]) ~name f =