diff options
author | Roland Senn <rsx@bluewin.ch> | 2020-01-30 17:11:06 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-09 02:55:06 -0500 |
commit | 82f9be8c6aafb70f612e72bef517c76437726c78 (patch) | |
tree | cd43800e3c2f3c044a0fbb6a8583a5f881e2aaed /libffi | |
parent | 3ae83da13f03d22a4d810b5d9c0f37f818cb6a00 (diff) | |
download | haskell-82f9be8c6aafb70f612e72bef517c76437726c78.tar.gz |
Fix #14628: Panic (No skolem Info) in GHCi
This patch implements the [sugggestion from Simon (PJ)](https://gitlab.haskell.org/ghc/ghc/issues/14628#note_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!
Diffstat (limited to 'libffi')
0 files changed, 0 insertions, 0 deletions