let stdin_to_diary (w: Writer.t) : unit Deferred.t =
(* First, we grab stdin like usual. *)
let stdin = Lazy.force Reader.stdin in
(* Next, we use Writer.pipe to convert our Writer.t into a Pipe.Writer.t.
* Then, we use Reader.transfer to transfer the contents of stdin to the
* writer. *)
Reader.transfer stdin (Writer.pipe w)