improved snake type constraint api