Closed amongonz closed 4 years ago
Thanks for catching this. sexp_opaque
as a type has been deprecated and superseded by the [@sexp.opaque]
attribute, which makes me a bit hesitant to expose the corresponding sexp_of_opaque
function.
If you're using ppx_sexp_conv
, you can use [%sexp_of: _]
as a substitute, or [%sexp_of: _[@sexp.opaque]]
if you specifically want the output to be <opaque>
. You can also add [@sexp.opaque]
to a type definition with [@@deriving sexp]
to achieve the same effect.
Otherwise, does (fun _ -> Sexp.Atom "<opaque>")
work for you?
If sexp_of_opaque
has been left out on purpose then yes, those will do. While I've got ppx_sexp_conv
available, the editing experience around PPX is not particularly pleasant at the moment so I'll take the latter option for now.
Base doesn't reexport sexplib0's
sexp_of_opaque
(noropaque_of_sexp
), despite it even being mentioned in the docs forType_equal.Id
. I'd expect it to be in Base since its the only function that makes sense when you lack a proper implementation forType_equal.Id.create
orComparator.make
.For now, I'm just using
Sexplib0.Sexp_conv.sexp_of_opaque
directly.