differentiate between compatibility and equality in types
add more test cases on program and function scoped type rules