Skip to content

Commit

Permalink
Solve segfault with OCaml 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thierry-martinez committed Jul 15, 2022
1 parent 40e616b commit e19ef99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ppx/metaquot_ppx.ml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
let mapper = object (self)
inherit Ppxlib.Ast_traverse.map as super

method! expression =
method! expression exp =
Gc.minor (); (* This seems to solve a segfault in OCaml 5.0
but this is weird!*)
Metaquot.Exp.lift { expression = super#expression; pattern = super#pattern }
exp

method! pattern =
Metaquot.Pat.lift { expression = super#expression; pattern = super#pattern }
Expand Down

0 comments on commit e19ef99

Please sign in to comment.