Pretty much the same way you'd do in Haskell or Rust: you add a `[@@deriving show]` directive to your datatype.