Hi. I want to use {..}
as a field type with @deriving(abstract)
. But when I try to define it like so:
@deriving(abstract)
type config = {x: {..}}
I get this error: “A type variable is unbound in this type declaration. In field x: {…} as 'a the variable 'a is unbound”
I came up with this workaround:
type x
external makeX: {..} => x = "%identity"
@deriving(abstract)
type config = {x: x}
let myConfig = config(~x=makeX({"foo": 1}))
But is there a better way?