Port const_eval from oldvisit to <V:Visitor> trait API.
Ported effect checker from oldvisit to <V:Visitor> trait API.