Note [CallStack and ExceptionContext hack]
It isn't really right that we treat CallStack and ExceptionContext dictionaries as canonical, in the sense of Note [Coherence and specialisation: overview]. They definitely are not! But if we use EvNonCanonical here we get lots of nospec (error @Int) dict string (since `error` takes a HasCallStack dict), and that isn't bottoming (at least not without extra work) So, hackily, we just say that HasCallStack and ExceptionContext are canonical, even though they aren't really.
References 1
- Coherence and specialisation: overview GHC.Core.InstEnv
Referenced by 2
- GHC.Tc.Solver.Default call site
- GHC.Tc.Solver.Dict call site