Add origins to meta-variables
Simon suggests that we should add origins for metavariables (e.g. "alpha arose from the instantiation of the function f
"). This could either be a field of the MetaTv
constructor of TcTyVarDetails
, or we could have different origins for different kinds of type variables. When unifying metavariables, we will need to combine the origins. Simon suggests that, to start off, we can simply pick the most informative origin and discard the other.
In !7812 (closed) I added origins for ConcreteTv
type variables, but extending this to other kinds of metavariables could improve error messages.