From ff67c79ee742024ca0ef41a9a7e540e1662d46bd Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Fri, 1 Jul 2022 12:52:29 +0100 Subject: 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 --- compiler/GHC/Tc/TyCl.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/GHC/Tc/TyCl.hs') 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 -- cgit v1.2.1