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
For the following program, it seems that I can't have a customized printing function for the type a, while using deriving show to generate the print function for type b.
type a = { x: b; y: int }
and b = A | B a | C a
[@@deriving show]
The text was updated successfully, but these errors were encountered:
I am facing a similar issue, where I have mutable records with circular references:
typecompinfo = {
mutable cfields: fieldinfolist;(** Information about the fields. Notice that each fieldinfo has a * pointer back to the host compinfo. This means that you should not * share fieldinfo's between two compinfo's *)mutable cattr: attributes;
[...]
}
andfieldinfo = {
mutable fcomp: compinfo;(** The host structure that contains this field. There can be only one * [compinfo] that contains the field. *)
[...]
}
and[...]
Is there a way of defining a custom printer (or to_yojson in my case specifically) for fieldinfo while using the default one for compinfo?
For the following program, it seems that I can't have a customized printing function for the type
a
, while usingderiving show
to generate the print function for typeb
.The text was updated successfully, but these errors were encountered: