diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-10-31 19:29:11 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-11-02 01:38:53 -0400 |
commit | a7e1be3d84d2b7d0515f909175cdfa5dcf0dc55c (patch) | |
tree | 5bc4f66b615c1eaf26bfbad6f08b8f7cc1adcfc1 /nofib | |
parent | da1a8e2986731b767f5c977cb873034e771d9371 (diff) | |
download | haskell-a7e1be3d84d2b7d0515f909175cdfa5dcf0dc55c.tar.gz |
Fix #20590 with another application of mkHsContextMaybe
We were always converting empty GADT contexts to `Just []` in `GHC.ThToHs`,
which caused the pretty-printer to always print them as `() => ...`. This is
easily fixed by using the `mkHsContextMaybe` function when converting GADT
contexts so that empty contexts are turned to `Nothing`. This is in the same
tradition established in commit 4c87a3d1d14f9e28c8aa0f6062e9c4201f469ad7.
In the process of fixing this, I discovered that the `Cxt` argument to
`mkHsContextMaybe` is completely unnecessary, as we can just as well check if
the `LHsContext GhcPs` argument is empty.
Fixes #20590.
Diffstat (limited to 'nofib')
0 files changed, 0 insertions, 0 deletions