Skip to content

Commit

Permalink
fix: binary parser (#2713)
Browse files Browse the repository at this point in the history
* fix: binary parser

* [ci skip] changelog entry
  • Loading branch information
anmonteiro authored Apr 20, 2023
1 parent 82dd9aa commit e1f2626
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/refmt/printer_maker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit e1f2626

Please sign in to comment.