No, that&#x27;s what the ppx rewriter is for (the metaprogramming I mentioned). You write <i>type foo = ... with sexp</i> and those functions will be generated automatically for you. Mind you, the whole Jane Street Core machinery is still a bit heavyweight for my taste, but that particular concern shouldn&#x27;t be an issue. For example, in utop:<p><pre><code>  utop # #require &quot;core&quot;;;
  utop # #require &quot;core.syntax&quot;;;
  utop # open Core.Std;;

  utop # type foo = int * string with sexp;;
  type foo = int * string
  val foo_of_sexp : Sexp.t -&gt; foo = &lt;fun&gt;
  val sexp_of_foo : foo -&gt; Sexp.t = &lt;fun&gt;                                         

  utop # sexp_of_foo (1, &quot;foo&quot;);;
  - : Sexp.t = (1 foo)</code></pre>