understanding type equality