Fix #14628: Panic (No skolem Info) in GHCi
This patch implements the sugggestion from Simon (PJ):
- Make
TcErrors.getSkolemInfo
return aSkolemInfo
rather than anImplication
. - If
getSkolemInfo
getsRuntimeUnk
s, just return a new data constructor inSkolemInfo
, calledRuntimeUnkSkol
. - In
TcErrors.pprSkols
print something sensible for aRuntimeUnkSkol
.
The getSkolemInfo
function paniced while formating suggestions to add type annotations (subfunction suggestAddSig
)
to a "Couldn't match type ‘x’ with ‘y’" error message.
The getSkolemInfo
function didn't find any Implication value and paniced.
With this patch the getSkolemInfo
function does no longer panic, if it finds RuntimeUnkSkol
s.
As the panic occured while processing an error message, we don't need to implement any new error message!