Closed WardBrian closed 1 month ago
Thanks for the report! I've looked into the former for a start. #29 should offer a fix.
I've now merged #29 and had a look at the second one.
The issue there is that the ppx is emitting a polymorphic comparison =
between string option
s, which after open Core
is redefined to an integer comparison function int -> int -> bool
, thus leading to a type error in the generated code... :shrug:
Emitting a call to Option.equal String.equal
instead should fix it.
Ah, that can also be fixed by changing our code to open Core.Poly (I think we do something similar to make Menhir happy), but it would be nice if that wasn’t necessary
I think you can also emit Stdlib.( = )
, if the polymorphic compare is important?
I've now opened #30 to address the second issue. I hope this helps. Thanks again for the report!
The build now works. Thanks!
I was interested in trying this with a large code-base (https://github.com/stan-dev/stanc3) but ran into a few compile-time errors. This seems to be independent of #9, as editing the line in
entry.ml
has no effect for me.The simplest error that arises is
I also got a stranger one, which isn't immediately tied to any ppx as far as I can tell: