[Git][ghc/ghc][wip/spj-apporv-Oct24] do not suppress pprArising

Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: 4dc25960 by Apoorv Ingle at 2025-06-06T11:57:32-05:00 do not suppress pprArising - - - - - 3 changed files: - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Gen/Expr.hs - testsuite/tests/indexed-types/should_fail/T5439.stderr Changes: ===================================== compiler/GHC/Tc/Errors/Ppr.hs ===================================== @@ -5327,12 +5327,10 @@ pprArising :: CtLoc -> SDoc -- Used for the main, top-level error message -- We've done special processing for TypeEq, KindEq, givens pprArising ct_loc - | in_generated_code = empty -- See Note ["Arising from" messages in generated code] | suppress_origin = empty | otherwise = pprCtOrigin orig where orig = ctLocOrigin ct_loc - in_generated_code = ctLocEnvInGeneratedCode (ctLocEnv ct_loc) suppress_origin | isGivenOrigin orig = True | otherwise = case orig of ===================================== compiler/GHC/Tc/Gen/Expr.hs ===================================== @@ -295,7 +295,7 @@ tcExpr :: HsExpr GhcRn -- These constructors are the union of -- - ones taken apart by GHC.Tc.Gen.Head.splitHsApps -- - ones understood by GHC.Tc.Gen.Head.tcInferAppHead_maybe --- See Note [Application chains and heads] in GHC.Tc.Gen.Ap +-- See Note [Application chains and heads] in GHC.Tc.Gen.App tcExpr e@(HsVar {}) res_ty = tcApp (exprCtOrigin e) e res_ty tcExpr e@(HsApp {}) res_ty = tcApp (exprCtOrigin e) e res_ty tcExpr e@(OpApp {}) res_ty = tcApp (exprCtOrigin e) e res_ty ===================================== testsuite/tests/indexed-types/should_fail/T5439.stderr ===================================== @@ -1,4 +1,3 @@ - T5439.hs:83:33: error: [GHC-83865] • Couldn't match expected type: Attempt (HElemOf rs) with actual type: Attempt (HHead (HDrop n0 l0)) @@ -6,8 +5,7 @@ T5439.hs:83:33: error: [GHC-83865] • Probable cause: ‘($)’ is applied to too few arguments In the second argument of ‘($)’, namely ‘inj $ Failure (e :: SomeException)’ - In a stmt of a 'do' block: - c <- complete ev $ inj $ Failure (e :: SomeException) + In the expression: complete ev $ inj $ Failure (e :: SomeException) In the expression: do c <- complete ev $ inj $ Failure (e :: SomeException) return $ c || not first @@ -28,5 +26,5 @@ T5439.hs:83:39: error: [GHC-83865] ‘Failure (e :: SomeException)’ In the second argument of ‘($)’, namely ‘inj $ Failure (e :: SomeException)’ - In a stmt of a 'do' block: - c <- complete ev $ inj $ Failure (e :: SomeException) + In the expression: complete ev $ inj $ Failure (e :: SomeException) + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4dc259608b090707ad7de9ea12067aa1... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4dc259608b090707ad7de9ea12067aa1... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Apoorv Ingle (@ani)