Move sumtype to the end of function signatures to preserve backward compatibility