From 09b37d16d86270b1d8b17276c83df36c2610d66b Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 17 Dec 2018 18:39:10 -0800 Subject: [PATCH] Fix failure on Windows when writing AST to stdout --- src/migrate_parsetree_ast_io.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/migrate_parsetree_ast_io.ml b/src/migrate_parsetree_ast_io.ml index 6d6d529d..ef06b186 100644 --- a/src/migrate_parsetree_ast_io.ml +++ b/src/migrate_parsetree_ast_io.ml @@ -88,6 +88,7 @@ let decompose_ast = function let to_channel oc (filename : filename) x = let magic_number, payload = decompose_ast x in + set_binary_mode_out oc true; output_string oc magic_number; output_value oc filename; output_value oc payload