summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/TyCl.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2022-07-01 12:52:29 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-11 16:19:57 -0400
commitff67c79ee742024ca0ef41a9a7e540e1662d46bd (patch)
tree6588e16a80e86696f7541c483a724903b82ad492 /compiler/GHC/Tc/TyCl.hs
parent5c24b1b3a9d6a4c2f471fd7d8ec65141a8b46357 (diff)
downloadhaskell-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.hs4
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