1. 20
  1. 3

    This was the topic for my internship back in 2017 working on the Reason compiler–integrating ppx_show into the language. I’m glad it has finally arrived (albeit in a different form) in OCaml.

    1. 2

      What do you mean? Pretty printers have been there since ages (the article is from 2017 but the fmt library is there since 2015) and the possibility to install pretty printers in the toplevel is earlier than that

      1. 4

        The goal was to automatically install a to_string function for every type created, not just in the top level. In normal execution

        1. 2

          Oh, I see. Neat!

    2. 2

      From the title I would’ve assumed this relies on some Obj magic, nice to see it doesn’t and just shows how to use pretty printers written using Fmt in the top-level.