diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index 62132277d91425bf7749e85525ac57a7c2a45dc0..a4c08c196eaeb163d531a1fa029d12e28af23073 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -1751,7 +1751,11 @@ fbinds1 :: { ([HsRecField RdrName (LHsExpr RdrName)], Bool) }
         | '..'                          { ([],   True) }
   
 fbind   :: { HsRecField RdrName (LHsExpr RdrName) }
-        : qvar '=' exp  { HsRecField $1 $3                False }
+        : qvar '=' texp { HsRecField $1 $3                False }
+                        -- RHS is a 'texp', allowing view patterns (Trac #6038)
+                        -- and, incidentaly, sections.  Eg
+                        -- f (R { x = show -> s }) = ...
+
         | qvar          { HsRecField $1 placeHolderPunRhs True }
                         -- In the punning case, use a place-holder
                         -- The renamer fills in the final value