I’ve something similar,
let trace = (~label: string="", obj: 'a) => {
Js.log2(label, obj)
obj
}
I prefer this sort of helper to be in userspace. If we decided to add this as a built-in function, then we should introduce a Debug module in Core to add this helper. But really I think this should just be in userspace.