This is intellectually ugly, since it implies parsing the same typename string twice. But on the other hand it avoids the notational pain and runtime overhead involved in using a record-returning function. So I think it might be roughly a wash for performance. Question to think about is which way is easier to use. I don't have an opinion particularly; just throwing the idea out there.