semantic: Correctly type classes when passing instances between modules.