How do you redefine the type format
from CamlinternalFormatBasics
module?
I tried to redefine the type as I redefine, say, the value map
of the module List
(include, with type, w/o a new module, etc.).
This is for using a specific format type with sprintf.
Here are the types involved from ('a, unit, string) format
to ('a, 'b, 'c, 'd, 'e, 'f) fmt
:
Module Printf
val sprintf : ('a, unit, string) format -> 'a
Module Stdlib
type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
type ('a, 'b, 'c, 'd, 'e, 'f) format6 =
('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
Module CamlinternalFormatBasics
type ('a, 'b, 'c, 'd, 'e, 'f) format6 =
| Format of ('a, 'b, 'c, 'd, 'e, 'f) fmt * string
type ('a, 'b, 'c, 'd, 'e, 'f) fmt =
| Char : ('a0, 'b0, 'c0, 'd0, 'e0, 'f0) fmt ->
(char -> 'a0, 'b0, 'c0, 'd0, 'e0, 'f0) fmt
| ...