See Beaver.MLIR.CAPI.mlirContextDetachDiagnosticHandler/2.
Beaver.MLIR.CAPI.mlirContextDetachDiagnosticHandler/2