Add types to hasheq and hasheqv.

Merge to 6.0.