Retain annotations on types through resolution
Handle bare x.y patterns when rewriting
Make types at top level available on module