WIP - use unify in inferTypes