You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error reported by Ast_pattern are not very informative, especially for the user of the PPX, who might not know anything about the AST.
Here is an example of an error generated by an unmatched AST pattern:
Error: PStr expected
Possible improvements:
Make a more complete sentence, with more information: Error: a "structure" node was expected, instead of a "..."
Allow for custom error message (or custom additional information) in the API. It is especially interesting for the alt function, which only expects from one branch. Example of a custom error message (see Implement new module type syntax ppx_import#87):
Error: [%%import] Type pattern (PTyp) is not supported, only type and module
type declarations are allowed
The error reported by
Ast_patternare not very informative, especially for the user of the PPX, who might not know anything about the AST.Here is an example of an error generated by an unmatched AST pattern:
Possible improvements:
Error: a "structure" node was expected, instead of a "..."altfunction, which only expects from one branch. Example of a custom error message (see Implement new module type syntax ppx_import#87):