Should this be factored out to (yet) another OCaml module?