janestreet / ppx_custom_printf

Printf-style format-strings for user-defined string conversion
MIT License
23 stars 9 forks source link

Example for parameterized type #4

Closed ghost closed 6 years ago

ghost commented 6 years ago

What is the syntax for parameterized types?

For example, the following does not compile.

let a = Some "a" in
Printf.printf !"%{sexp:string option}\n" a
hhugo commented 6 years ago

This is the right syntax. What error do you get?

ghost commented 6 years ago

Actually, I found the problem. I forgot to include open Core.