Parameterise the Messages type over an abstract error type
This commit paves the way to a richer and more structured representation of GHC error messages, as per GHC proposal 306. More specifically Messages
from GHC.Types.Error
now gains an extra type parameter, that we instantiate to ErrDoc
for now. Later, this will allow us to replace ErrDoc with something more structured (for example messages coming from the parser, the typechecker etc).
See also the Wiki for the proposal and #18516 .
Edited by Alfredo Di Napoli