[commit: ghc] wip/tdammers-7258: Fixed regression: derived Read instance must retain reset call (09911dc)

git at git.haskell.org git at git.haskell.org
Thu Oct 19 14:38:39 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/tdammers-7258
Link       : http://ghc.haskell.org/trac/ghc/changeset/09911dc5017fc4fcbbeaec963e3859ddaff3ecc1/ghc

>---------------------------------------------------------------

commit 09911dc5017fc4fcbbeaec963e3859ddaff3ecc1
Author: Tobias Dammers <tdammers at gmail.com>
Date:   Thu Oct 19 16:17:02 2017 +0200

    Fixed regression: derived Read instance must retain reset call
    
    See https://phabricator.haskell.org/D4108


>---------------------------------------------------------------

09911dc5017fc4fcbbeaec963e3859ddaff3ecc1
 compiler/typecheck/TcGenDeriv.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcGenDeriv.hs b/compiler/typecheck/TcGenDeriv.hs
index 2d004be..26ac853 100644
--- a/compiler/typecheck/TcGenDeriv.hs
+++ b/compiler/typecheck/TcGenDeriv.hs
@@ -1079,7 +1079,9 @@ gen_Read_binds get_fixity loc tycon
             (nlVarPat a)
             (nlHsApps
               read_field
-              [nlHsLit (mkHsString lbl_str), nlHsVar readPrec_RDR]
+              [ nlHsLit (mkHsString lbl_str)
+              , nlHsVarApps reset_RDR [readPrec_RDR]
+              ]
             )
           )
         ]



More information about the ghc-commits mailing list