package functoria

  1. Overview
  2. Docs

Name helpers.

val ocamlify : string -> string

ocamlify n is an OCaml identifier looking very much like n, but where invalid characters have been removed or replaced: all characters outside of 'a'-'z''A'-'Z''0''9''_''-', and replacing '-' with '_'. If the resulting string starts with a digit or is empty then it raises Invalid_argument.

val create : string -> prefix:string -> string

name key ~prefix is an deterministic name starting by prefix. The name is derived from key.