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
utop # #require"ppx_deriving_yojson";;
utop # type t =A|B [@@deriving yojson];;
utop # moduleM=structtype nonrec t = t [@@deriving yojson] end;;
utop # M.to_yojson A;;
(* never returns *)^CInterrupted.(* Work around by using different type name. *)
utop # moduleM=structtype u = t [@@deriving yojson] end;;
utop # M.u_to_yojson A;;
- : Yojson.Safe.json =`List [`String"A"]
The text was updated successfully, but these errors were encountered:
utop # type t = {a:int};;
utop # type nonrec t = t [@@deriving yojson];;
typenonrec t = tvalto_yojson : t -> Yojson.Safe.json=<fun>valof_yojson : Yojson.Safe.json -> tPpx_deriving_yojson_runtime.error_or=<fun>
Last command shouldn't even compile since first definition of t lacks the corresponding derived functions.
The text was updated successfully, but these errors were encountered: