Created
January 6, 2021 20:15
-
-
Save cemerick/cf945721a7cf00054148ee036225b902 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let asprintf_nm x = | |
let open Format in | |
let fns = get_formatter_out_functions () in | |
try | |
set_formatter_out_functions {fns with out_newline = Fun.const () ; out_indent = Fun.const ()}; | |
asprintf x | |
with exn -> | |
set_formatter_out_functions fns; | |
raise exn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment