And thus mercurous halide is Hg2X2; and mercuric halide is HgX2. As is common with ous versus ic endings, the ic denotes the higher oxidation state.
In HgX2 the metal displays a formal +II oxidation state; in Hg2X2 the metal displays a formal +I oxidation state. Where there is an element-element bond, as here in Hg−Hg, or in a C−C linkage, the 2 electrons of the bond are assumed to be distributed EQUALLY to the bound atoms. When we assign oxidation states for element-heteroelement bonds, the most electronegative atom gets the 2 electrons from the bond.
And thus for HO−CR3, we get formally HO− and +CR3. The ipso carbon in +CR3 has a FORMAL C(+I) oxidation state.
I write formal guardedly. Of course with such designations, the assignment of oxidation number is very much a formalism, a practice with little fundamental significance, but there is utility in assigning oxidation numbers for balancing redox reactions.