package ppx_factory

  1. Overview
  2. Docs

Functions to raise errors specific to [@@deriving factory]

val errorf : loc:Ppxlib.Location.t -> ('a, unit, string, 'b) format4 -> 'a

Raise an error with the formatted message prefixed by "ppx_factory.factory: "

val unhandled_type_kind : loc:Ppxlib.Location.t -> string -> 'a

Use when trying to derive a factory for an unhandled type kind. The message indicates factory can only be derived from record and variant types.

OCaml

Innovation. Community. Security.