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
-
e199446b
by Apoorv Ingle at 2025-07-02T16:11:44-05:00
3 changed files:
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/Tc/Types/Origin.hs
- testsuite/tests/rep-poly/RepPolyRecordUpdate.stderr
Changes:
... | ... | @@ -1234,8 +1234,8 @@ Other places that requires from the same treatment: |
1234 | 1234 | |
1235 | 1235 | -- Warn about certain types of values discarded in monadic bindings (#3263)
|
1236 | 1236 | warnDiscardedDoBindings :: LHsExpr GhcTc -> Type -> Type -> DsM ()
|
1237 | -warnDiscardedDoBindings rhs m_ty elt_ty
|
|
1238 | - = do { warn_unused <- woptM Opt_WarnUnusedDoBind
|
|
1237 | +warnDiscardedDoBindings rhs@(L rhs_loc _) m_ty elt_ty
|
|
1238 | + = putSrcSpanDsA rhs_loc $ do { warn_unused <- woptM Opt_WarnUnusedDoBind
|
|
1239 | 1239 | ; warn_wrong <- woptM Opt_WarnWrongDoBind
|
1240 | 1240 | ; when (warn_unused || warn_wrong) $
|
1241 | 1241 | do { fam_inst_envs <- dsGetFamInstEnvs
|
... | ... | @@ -1229,11 +1229,10 @@ mkFRRUnboxedSum = FRRUnboxedSum |
1229 | 1229 | -- and is reported separately.
|
1230 | 1230 | pprFixedRuntimeRepContext :: FixedRuntimeRepContext -> SDoc
|
1231 | 1231 | pprFixedRuntimeRepContext (FRRRecordCon lbl _arg)
|
1232 | - = sep [ text "The field", quotes (ppr lbl)
|
|
1232 | + = sep [ text "The field", quotes (ppr lbl) -- TODO ANI: Where does this get used? Add missing test?
|
|
1233 | 1233 | , text "of the record constructor" ]
|
1234 | -pprFixedRuntimeRepContext (FRRRecordUpdate lbl _arg)
|
|
1235 | - = sep [ text "The record update at field"
|
|
1236 | - , quotes (ppr lbl) ]
|
|
1234 | +pprFixedRuntimeRepContext (FRRRecordUpdate lbl _)
|
|
1235 | + = sep [ text "The field", quotes (ppr lbl) ]
|
|
1237 | 1236 | pprFixedRuntimeRepContext (FRRBinder binder)
|
1238 | 1237 | = sep [ text "The binder"
|
1239 | 1238 | , quotes (ppr binder) ]
|
... | ... | @@ -13,8 +13,7 @@ RepPolyRecordUpdate.hs:7:35: error: [GHC-55287] |
13 | 13 | X a :: TYPE rep
|
14 | 14 | |
15 | 15 | RepPolyRecordUpdate.hs:13:9: error: [GHC-55287]
|
16 | - • The argument ‘fld’ of ‘MkX’
|
|
17 | - does not have a fixed runtime representation.
|
|
16 | + • The field ‘fld’ does not have a fixed runtime representation.
|
|
18 | 17 | Its type is:
|
19 | 18 | a0 :: TYPE rep0
|
20 | 19 | When unifying:
|