Closed jnfoster closed 2 years ago
This is because Pervasives and stdlib modules are injected explicitly into the rewritten code, so that the internal ppx rewriter operations (like printf
or ==
) would be hygienic. I think the rewritten code can be massaged to make your use case work, but I'm afraid I don't have time to do it myself.
If I put the following code in a file
tester.p4
,and compile it in a directory with this Dune file,
I get a binary that works as expected:
However, if I rename the
MyString
module toString
,and recompile, I get an error:
I understand that PPX-based rewriters often do something special with base types and other built-ins, but I'm surprised this doesn't work...