But how does it work in the presence of overloaded identifiers? I assume you must somehow resolve which instances are used in each particular test case and track changes to respective definitions. Is it possible to do it just through HIE files, without type checking?
Say, you have factorial :: Num a => a -> a and want to test that factorial @Foo 5 = 120. The definition of factorial has not changed and same for the type declaration of Foo. But how do you check that instance Num Foo remains the same? We don’t even know upfront where it is defined.