Formatter string provided by a function. How can I do that?

The compiler has no way of knowing that the return type of getFmt is a formatting string instead of a plain string (since both use the same syntax). You need to help the compiler by annotating the function:

let getFmt tagType : _ format =

Cheers,
Nicolas

4 Likes