Up

Module Registrar

Signature

type 'context t

Names are organized by context. For instance contexts can be: expressions, patterns, types, ...

val create : kind:string -> current_file:string -> string_of_context:('context -> string option) -> 'context t

- kind is a description of the things registered. For instance: "extension", "attribute", ...

  • current_file is where this function is called. Must be __FILE__.
  • string_of_context: human readable description of a context
val register : 'context t -> 'context -> string -> unit
val spellcheck : 'context t -> 'context -> ?white_list:string list -> string -> string option
val raise_errorf : 'context t -> 'context -> ?white_list:string list -> (string -> 'a, unit, string, 'c) Pervasives.format4 -> string Location.loc -> 'a