12345678910111213141516171819202122232425262728(** Provides type-specific conversion functions to and from [string]. *)open!Import(** Templated to provide two [of_string] functions. The first may stack allocate, and
always takes its input at the same mode as its output. The second may take local
input, and always produces global output. In the default case of global input and heap
output, they are equivalent and one shadows the other. *)moduletype%template[@model=(local,global)][@alloca@m=(heap_global,stack_local)]To_stringable=sigtypetvalto_string:t@m->string@m[@@alloca]valto_string:t@l->stringendmoduletype%template[@model=(local,global)]Of_stringable=sigtypetvalof_string:string@l->tendmoduletype%template[@model=(local,global)][@alloca=(stack,heap)]S=sigtypetincludeOf_stringable[@model]withtypet:=tincludeTo_stringable[@model][@alloca]withtypet:=tend