Generalising Def and Pos to Type Analysis