Global type class instance coherence check
I was talking today with @trac-gershomb and @davean about https://gitlab.haskell.org/ghc/ghc/-/wikis/Rehabilitating-Orphans-with-Order-theory. While we do not yet agree on what the end goal lucks like, we do agree that the first step needs to be providing some way to fully enforce coherence today.
The "world semantics" from Chapter 1, section 4 of https://people.mpi-sws.org/~skilpat/papers/kilpatrick-thesis-nov-2019-publication.pdf
Yes, it is possible that this would be slow. Yes, it is possible that whatever final design of "Rehabilitating Orphans" that we come up with would allow for something more optimized. But that's OK. A good way to think about this is that the simple "crawl all the hi files, do all the unification" algorithm is at least the -dcore-lint
of type class coherence---an indispensable tool by which fancier designs can be sanity-checked.