Improve error reporting in interface typechecking