diff --git a/HISTORY.md b/HISTORY.md index f3437477a..d5b055021 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,7 +5,9 @@ - Fix missing patterns around contraint pattern (a pattern with a type annotation). - Fix top level extension printing - Remove the dependency on the `result` package, which isn't needed for OCaml - 4.03 and above (@anmonteiro) [2703](https://github.com/reasonml/reason/pull/2703) + 4.03 and above (@anmonteiro) [#2703](https://github.com/reasonml/reason/pull/2703) +- Fix the binary parser by converting to the internal AST version used by + Reason (@anmonteiro) [#2713](https://github.com/reasonml/reason/pull/2713) ## 3.8.2 diff --git a/src/refmt/printer_maker.ml b/src/refmt/printer_maker.ml index aba0b359c..b7eb108f5 100644 --- a/src/refmt/printer_maker.ml +++ b/src/refmt/printer_maker.ml @@ -47,10 +47,10 @@ let ocamlBinaryParser use_stdin filename = match Ast_io.from_channel chan with | Error _ -> assert false | Ok (_, Ast_io.Impl ((module Version), ast)) -> - let module Convert = Convert(Version)(OCaml_408) in + let module Convert = Convert(Version)(OCaml_411) in ((Obj.magic (Convert.copy_structure ast), []), true, false) | Ok (_, Ast_io.Intf ((module Version), ast)) -> - let module Convert = Convert(Version)(OCaml_408) in + let module Convert = Convert(Version)(OCaml_411) in ((Obj.magic (Convert.copy_signature ast), []), true, true) let reasonBinaryParser use_stdin filename =