Use a sum type as the return for downloadIndex.