Using bs-deriving, I can derive e.g. show
instances using [@deriving show]
. However, it's not clear how I would use the same derivation but providing a custom show instance for a specific datatype.
Example:
[@deriving show]
type bar = |Bar(int);
[@deriving show]
type foo = |Foo(int, bar);
Using the above example, how would I change Bar to print its integer in e.g. hexadecimal?