typed callbacks for dialyzer