diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2022-07-01 12:52:29 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-08-11 16:19:57 -0400 |
commit | ff67c79ee742024ca0ef41a9a7e540e1662d46bd (patch) | |
tree | 6588e16a80e86696f7541c483a724903b82ad492 /compiler/GHC/Tc/TyCl.hs | |
parent | 5c24b1b3a9d6a4c2f471fd7d8ec65141a8b46357 (diff) | |
download | haskell-ff67c79ee742024ca0ef41a9a7e540e1662d46bd.tar.gz |
EPA: DotFieldOcc does not have exact print annotations
For the code
{-# LANGUAGE OverloadedRecordUpdate #-}
operatorUpdate f = f{(+) = 1}
There are no exact print annotations for the parens around the +
symbol, nor does normal ppr print them.
This MR fixes that.
Closes #21805
Updates haddock submodule
Diffstat (limited to 'compiler/GHC/Tc/TyCl.hs')
-rw-r--r-- | compiler/GHC/Tc/TyCl.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs index 03e7d45148..145f1b26f2 100644 --- a/compiler/GHC/Tc/TyCl.hs +++ b/compiler/GHC/Tc/TyCl.hs @@ -98,6 +98,8 @@ import GHC.Utils.Panic.Plain import GHC.Utils.Constants (debugIsOn) import GHC.Utils.Misc +import Language.Haskell.Syntax.Basic (FieldLabelString(..)) + import Control.Monad import Data.Functor.Identity import Data.List ( partition) @@ -4270,7 +4272,7 @@ checkValidTyCon tc -- The order of these equivalence classes might conceivably (non-deterministically) -- depend on the result of this comparison, but that just affects the order in which -- fields are checked for compatibility. It will not affect the compiled binary. - cmp_fld (f1,_) (f2,_) = flLabel f1 `uniqCompareFS` flLabel f2 + cmp_fld (f1,_) (f2,_) = field_label (flLabel f1) `uniqCompareFS` field_label (flLabel f2) get_fields con = dataConFieldLabels con `zip` repeat con -- dataConFieldLabels may return the empty list, which is fine |