Change doc generation types to be partial functions