Remove GhcHint and ImportError constructors from TcRnNotInScope
The TcRnNotInScope
constructor of TcRnMessage
should not take [GhcHint]
and [ImportError]
arguments. Instead, those belong in the enclosing ErrInfo
:
data ErrInfo = ErrInfo {
errInfoContext :: ![ErrCtxtMsg]
-- ^ Extra context associated to the error.
, errInfoSupplementary :: !(Maybe (HoleFitDispConfig, [SupplementaryInfo]))
-- ^ Extra supplementary info associated to the error.
, errInfoHints :: ![GhcHint]
-- ^ Extra hints associated to the error.
}
data SupplementaryInfo
= SupplementaryBindings RelevantBindings
| SupplementaryHoleFits ValidHoleFits
| SupplementaryCts (NE.NonEmpty (PredType, RealSrcSpan))
| SupplementaryImportErrors (NE.NonEmpty ImportError)
Additionally TcRnTermNameInType
should also not store [GhcHint]
either.
Edited by sheaf