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
Hi!
I have a bunch of recursive types, one of which is using the Map fonctor.
I tried to follow the example and wrote this:
module TMap = Map.Make( struct type t = string let compare = compare end)
type 'a tmap = 'a TMap.t
type mytmap = t_content tmap [@to_yojson (fun m -> TMap.bindings m |> [%to_yojson: (string * t_content) list])]
and t_content = {
t1 : t1;
t2 : t2;
}
and t1 = string
and t2 =
| Foo of t2
| Bar of mytmap
[@@deriving yojson]
When compiling, OCaml gives me Error: Uninterpreted extension 'to_yojson'.
The text was updated successfully, but these errors were encountered:
Hi!
I have a bunch of recursive types, one of which is using the Map fonctor.
I tried to follow the example and wrote this:
When compiling, OCaml gives me
Error: Uninterpreted extension 'to_yojson'.
The text was updated successfully, but these errors were encountered: