summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2021-10-31 19:29:11 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2021-10-31 19:29:18 -0400
commit461fd5dbe1395078cac3e7f97fe80d56cbdd3b08 (patch)
treec26118db22f2d3367fe304a6366da2ad8f70cec2 /ghc
parentea862ef5b3779476e0aa2d20bbae1946d07430f1 (diff)
downloadhaskell-wip/T20590.tar.gz
Fix #20590 with another application of mkHsContextMaybewip/T20590
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 'ghc')
0 files changed, 0 insertions, 0 deletions