
Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: bde2465e by Apoorv Ingle at 2025-07-02T16:02:03-05:00 fix unused do binding warning error location - - - - - e199446b by Apoorv Ingle at 2025-07-02T16:11:44-05:00 FRRRecordUpdate message change - - - - - 3 changed files: - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/Tc/Types/Origin.hs - testsuite/tests/rep-poly/RepPolyRecordUpdate.stderr Changes: ===================================== compiler/GHC/HsToCore/Expr.hs ===================================== @@ -1234,8 +1234,8 @@ Other places that requires from the same treatment: -- Warn about certain types of values discarded in monadic bindings (#3263) warnDiscardedDoBindings :: LHsExpr GhcTc -> Type -> Type -> DsM () -warnDiscardedDoBindings rhs m_ty elt_ty - = do { warn_unused <- woptM Opt_WarnUnusedDoBind +warnDiscardedDoBindings rhs@(L rhs_loc _) m_ty elt_ty + = putSrcSpanDsA rhs_loc $ do { warn_unused <- woptM Opt_WarnUnusedDoBind ; warn_wrong <- woptM Opt_WarnWrongDoBind ; when (warn_unused || warn_wrong) $ do { fam_inst_envs <- dsGetFamInstEnvs ===================================== compiler/GHC/Tc/Types/Origin.hs ===================================== @@ -1229,11 +1229,10 @@ mkFRRUnboxedSum = FRRUnboxedSum -- and is reported separately. pprFixedRuntimeRepContext :: FixedRuntimeRepContext -> SDoc pprFixedRuntimeRepContext (FRRRecordCon lbl _arg) - = sep [ text "The field", quotes (ppr lbl) + = sep [ text "The field", quotes (ppr lbl) -- TODO ANI: Where does this get used? Add missing test? , text "of the record constructor" ] -pprFixedRuntimeRepContext (FRRRecordUpdate lbl _arg) - = sep [ text "The record update at field" - , quotes (ppr lbl) ] +pprFixedRuntimeRepContext (FRRRecordUpdate lbl _) + = sep [ text "The field", quotes (ppr lbl) ] pprFixedRuntimeRepContext (FRRBinder binder) = sep [ text "The binder" , quotes (ppr binder) ] ===================================== testsuite/tests/rep-poly/RepPolyRecordUpdate.stderr ===================================== @@ -13,8 +13,7 @@ RepPolyRecordUpdate.hs:7:35: error: [GHC-55287] X a :: TYPE rep RepPolyRecordUpdate.hs:13:9: error: [GHC-55287] - • The argument ‘fld’ of ‘MkX’ - does not have a fixed runtime representation. + • The field ‘fld’ does not have a fixed runtime representation. Its type is: a0 :: TYPE rep0 When unifying: View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d37adc6944a6cf04e1e57dafea3e338... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d37adc6944a6cf04e1e57dafea3e338... You're receiving this email because of your account on gitlab.haskell.org.