I tried to use ppx-deriving and its show plugin to get easy stringification for my ADTs. But in the context of my project I want it to be easily machine readable, while it seems that show is meant for pretty-printing. For example if I have this:
type long_foo = FooooooooooLooooooooong of string
[@@deriving show]
then the result of
show_long_foo ( FooooooooooLooooooooong "LOOOOOOOOOOOOOOOOOOONGFOOOOOO" )
will be something like
(FooooooooooLooooooooong
"LOOOOOOOOOOOOOOOOOOONGFOOOOOO")
when I really want it on the same line, with a single space in between, no matter how long that line will be. Is there a tweak I can make to the deriving annotation, or to the way I link the ppx? If there is I can’t find it in the obvious documentation places ![]()
Thanks.