summaryrefslogtreecommitdiff
path: root/compiler/GHC/Rename/Bind.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/Rename/Bind.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/Rename/Bind.hs')
-rw-r--r--compiler/GHC/Rename/Bind.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Rename/Bind.hs b/compiler/GHC/Rename/Bind.hs
index 5ade2db117..f69091c92d 100644
--- a/compiler/GHC/Rename/Bind.hs
+++ b/compiler/GHC/Rename/Bind.hs
@@ -70,6 +70,8 @@ import GHC.Data.Maybe ( orElse )
import GHC.Data.OrdList
import qualified GHC.LanguageExtensions as LangExt
+import Language.Haskell.Syntax.Basic (FieldLabelString(..))
+
import Control.Monad
import Data.Foldable ( toList )
import Data.List ( partition, sortBy )
@@ -710,7 +712,7 @@ rnPatSynBind sig_fn bind@(PSB { psb_id = L l name
RecCon vars ->
do { checkDupRdrNames (map (foLabel . recordPatSynField) vars)
; fls <- lookupConstructorFields name
- ; let fld_env = mkFsEnv [ (flLabel fl, fl) | fl <- fls ]
+ ; let fld_env = mkFsEnv [ (field_label $ flLabel fl, fl) | fl <- fls ]
; let rnRecordPatSynField
(RecordPatSynField { recordPatSynField = visible
, recordPatSynPatVar = hidden })