diff options
| author | Maxime Dénès | 2017-03-21 15:26:17 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2017-03-21 15:33:20 +0100 |
| commit | 28d3bb3c8bddc63d038d8d55a34c928675fa9f7b (patch) | |
| tree | 1eb3fd20c42622c9a1ca7f9349068f7301274038 /plugins/extraction/scheme.ml | |
| parent | becc6ef43a0f838d1f6388e8c7373c13f26082bc (diff) | |
| parent | d25b1431eb73a04bdfc0f1ad2922819b69bba93a (diff) | |
Merge PR#134: Enable `-safe-string`
Diffstat (limited to 'plugins/extraction/scheme.ml')
| -rw-r--r-- | plugins/extraction/scheme.ml | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/extraction/scheme.ml b/plugins/extraction/scheme.ml index a6309e61f9..8d0cc4a0db 100644 --- a/plugins/extraction/scheme.ml +++ b/plugins/extraction/scheme.ml @@ -40,11 +40,7 @@ let preamble _ comment _ usf = (if usf.mldummy then str "(define __ (lambda (_) __))\n\n" else mt ()) let pr_id id = - let s = Id.to_string id in - for i = 0 to String.length s - 1 do - if s.[i] == '\'' then s.[i] <- '~' - done; - str s + str @@ String.map (fun c -> if c == '\'' then '~' else c) (Id.to_string id) let paren = pp_par true |
