123456789101112131415161718openBaseincludeStringletget="get"letapply_exn="apply_exn"letof_list_exn="of_list_exn"letfunction_of_vartvar=(* Starts with a "_", so that some functions can be unused without the compiler
complaining. E.g. if [type ('a, 'b) t = 'a option], then the _get_b and _apply_b
functions will be ignored *)lettext=matchString.chop_suffixt~suffix:"_exn"with|None->t^"_"^Var.to_stringvar|Someprefix->prefix^"_"^Var.to_stringvar^"_exn"inBuild_helper.Text("_"^text);;