• Roland Senn's avatar
    Fix #14628: Panic (No skolem Info) in GHCi · 82f9be8c
    Roland Senn authored
    This patch implements the [sugggestion from Simon (PJ)](#14628 (comment 146559)):
    - Make `TcErrors.getSkolemInfo` return a `SkolemInfo` rather than an `Implication`.
    - If `getSkolemInfo` gets `RuntimeUnk`s, just return a new data constructor in `SkolemInfo`, called `RuntimeUnkSkol`.
    - In `TcErrors.pprSkols` print something sensible for a `RuntimeUnkSkol`.
    
    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!
    82f9be8c
Name
Last commit
Last update
.gitlab Loading commit data...
bindisttest Loading commit data...
compiler Loading commit data...
distrib Loading commit data...
docs Loading commit data...
driver Loading commit data...
ghc Loading commit data...
hadrian Loading commit data...
includes Loading commit data...
libffi Loading commit data...
libffi-tarballs @ 14c0d0ca Loading commit data...
libraries Loading commit data...
mk Loading commit data...
nofib @ c9fe4e92 Loading commit data...
rts Loading commit data...
rules Loading commit data...
testsuite Loading commit data...
utils Loading commit data...
.appveyor.sh Loading commit data...
.ghcid Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
CODEOWNERS Loading commit data...
HACKING.md Loading commit data...
INSTALL.md Loading commit data...
LICENSE Loading commit data...
MAKEHELP.md Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
aclocal.m4 Loading commit data...
appveyor.yml Loading commit data...
boot Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure.ac Loading commit data...
ghc.mk Loading commit data...
hie.yaml Loading commit data...
install-sh Loading commit data...
llvm-passes Loading commit data...
llvm-targets Loading commit data...
packages Loading commit data...
validate Loading commit data...