summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Gen/Head.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Gen/Head.hs')
-rw-r--r--compiler/GHC/Tc/Gen/Head.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Tc/Gen/Head.hs b/compiler/GHC/Tc/Gen/Head.hs
index eb5da5ca26..3d6d51ff22 100644
--- a/compiler/GHC/Tc/Gen/Head.hs
+++ b/compiler/GHC/Tc/Gen/Head.hs
@@ -546,7 +546,9 @@ finish_ambiguous_selector lr@(L _ rdr) parent_type
Nothing -> failWithTc (fieldNotInType parent rdr) ;
Just gre ->
+ -- See Note [Unused name reporting and HasField] in GHC.Tc.Instance.Class
do { addUsedGRE True gre
+ ; keepAlive (greMangledName gre)
; return (greMangledName gre) } } } } }
-- This field name really is ambiguous, so add a suitable "ambiguous