Simon Peyton Jones pushed to branch wip/T23162-part2 at Glasgow Haskell Compiler / GHC Commits: a6edda86 by Simon Peyton Jones at 2025-12-06T00:16:50+00:00 Final wibbles - - - - - 10 changed files: - compiler/GHC/Tc/Solver/FunDeps.hs - testsuite/tests/quantified-constraints/T15316A.stderr - testsuite/tests/quantified-constraints/T17267.stderr - testsuite/tests/quantified-constraints/T17267a.stderr - testsuite/tests/quantified-constraints/T17267b.stderr - testsuite/tests/quantified-constraints/T17267c.stderr - testsuite/tests/quantified-constraints/T17267e.stderr - testsuite/tests/quantified-constraints/T17458.stderr - testsuite/tests/typecheck/should_fail/ContextStack1.stderr - testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr Changes: ===================================== compiler/GHC/Tc/Solver/FunDeps.hs ===================================== @@ -334,9 +334,8 @@ tryDictFunDepsLocal dict_ct@(DictCt { di_cls = cls, di_ev = work_ev }) text "unif =" <+> ppr unif_happened $$ text "eqns = " <+> ppr eqns -- See (DFL1) of Note [Do fundeps last] - ; if insoluble then continueWith True - else if unif_happened then startAgainWith (CDictCan dict_ct) - else continueWith False } + ; if unif_happened then startAgainWith (CDictCan dict_ct) + else continueWith insoluble } where work_pred = ctEvPred work_ev work_is_given = isGiven work_ev @@ -540,9 +539,8 @@ tryFDEqns fam_tc work_args work_item@(EqCt { eq_ev = ev, eq_rhs= rhs }) mk_fd_eq , text "eqns:" <+> ppr fd_eqns ]) ; (insoluble, unif_happened) <- solveFunDeps ev fd_eqns - ; if insoluble then continueWith True - else if unif_happened then startAgainWith (CEqCan work_item) - else continueWith False } + ; if unif_happened then startAgainWith (CEqCan work_item) + else continueWith insoluble } ----------------------------------------- -- User-defined type families ===================================== testsuite/tests/quantified-constraints/T15316A.stderr ===================================== @@ -1,7 +1,6 @@ - T15316A.hs:15:23: error: [GHC-40404] • Reduction stack overflow; size = 201 - When simplifying the following type: Class a + When simplifying the following constraint: Class a • In the third argument of ‘subsume’, namely ‘method’ In the expression: subsume p p method In an equation for ‘value’: value p = subsume p p method @@ -10,3 +9,4 @@ T15316A.hs:15:23: error: [GHC-40404] (any upper bound you could choose might fail unpredictably with minor updates to GHC, so disabling the check is recommended if you're sure that type checking should terminate) + ===================================== testsuite/tests/quantified-constraints/T17267.stderr ===================================== @@ -1,7 +1,6 @@ - T17267.hs:17:12: error: [GHC-40404] • Reduction stack overflow; size = 201 - When simplifying the following type: a ~ b + When simplifying the following constraint: a ~ b • In the expression: r In an equation for ‘oops’: oops r = r In an equation for ‘unsafeCoerce’: @@ -15,3 +14,4 @@ T17267.hs:17:12: error: [GHC-40404] (any upper bound you could choose might fail unpredictably with minor updates to GHC, so disabling the check is recommended if you're sure that type checking should terminate) + ===================================== testsuite/tests/quantified-constraints/T17267a.stderr ===================================== @@ -1,7 +1,6 @@ - T17267a.hs:18:12: error: [GHC-40404] • Reduction stack overflow; size = 201 - When simplifying the following type: C a b + When simplifying the following constraint: C a b • In the expression: op x In an equation for ‘oops’: oops x = op x In an equation for ‘uc’: @@ -15,3 +14,4 @@ T17267a.hs:18:12: error: [GHC-40404] (any upper bound you could choose might fail unpredictably with minor updates to GHC, so disabling the check is recommended if you're sure that type checking should terminate) + ===================================== testsuite/tests/quantified-constraints/T17267b.stderr ===================================== @@ -1,7 +1,6 @@ - T17267b.hs:15:12: error: [GHC-40404] • Reduction stack overflow; size = 201 - When simplifying the following type: a ~ b + When simplifying the following constraint: a ~ b • In the expression: x In an equation for ‘oops’: oops x = x In an equation for ‘uc’: @@ -15,3 +14,4 @@ T17267b.hs:15:12: error: [GHC-40404] (any upper bound you could choose might fail unpredictably with minor updates to GHC, so disabling the check is recommended if you're sure that type checking should terminate) + ===================================== testsuite/tests/quantified-constraints/T17267c.stderr ===================================== @@ -1,7 +1,6 @@ - T17267c.hs:22:14: error: [GHC-40404] • Reduction stack overflow; size = 201 - When simplifying the following type: C a b + When simplifying the following constraint: C a b • In the expression: r In an equation for ‘oops’: oops r = r In an equation for ‘unsafeCoerce’: @@ -15,3 +14,4 @@ T17267c.hs:22:14: error: [GHC-40404] (any upper bound you could choose might fail unpredictably with minor updates to GHC, so disabling the check is recommended if you're sure that type checking should terminate) + ===================================== testsuite/tests/quantified-constraints/T17267e.stderr ===================================== @@ -1,7 +1,6 @@ - T17267e.hs:16:14: error: [GHC-40404] • Reduction stack overflow; size = 201 - When simplifying the following type: Show a + When simplifying the following constraint: Show a • In the expression: show In an equation for ‘pseudoShow’: pseudoShow = show Suggested fix: @@ -9,3 +8,4 @@ T17267e.hs:16:14: error: [GHC-40404] (any upper bound you could choose might fail unpredictably with minor updates to GHC, so disabling the check is recommended if you're sure that type checking should terminate) + ===================================== testsuite/tests/quantified-constraints/T17458.stderr ===================================== @@ -1,7 +1,6 @@ - T17458.hs:32:32: error: [GHC-40404] • Reduction stack overflow; size = 201 - When simplifying the following type: Typeable Void + When simplifying the following constraint: Typeable Void • In the expression: eqT In the expression: case eqT of @@ -17,3 +16,4 @@ T17458.hs:32:32: error: [GHC-40404] (any upper bound you could choose might fail unpredictably with minor updates to GHC, so disabling the check is recommended if you're sure that type checking should terminate) + ===================================== testsuite/tests/typecheck/should_fail/ContextStack1.stderr ===================================== @@ -1,7 +1,7 @@ - ContextStack1.hs:10:5: error: [GHC-40404] • Reduction stack overflow; size = 11 - When simplifying the following type: Cls [[[[[[[[[[()]]]]]]]]]] + When simplifying the following constraint: + Cls [[[[[[[[[[[()]]]]]]]]]]] • In the expression: meth In an equation for ‘t’: t = meth Suggested fix: @@ -9,3 +9,4 @@ ContextStack1.hs:10:5: error: [GHC-40404] (any upper bound you could choose might fail unpredictably with minor updates to GHC, so disabling the check is recommended if you're sure that type checking should terminate) + ===================================== testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr ===================================== @@ -49,7 +49,8 @@ TcCoercibleFail.hs:30:9: error: [GHC-18872] TcCoercibleFail.hs:35:8: error: [GHC-40404] • Reduction stack overflow; size = 201 - When simplifying the following type: Fix (Either Age) + When simplifying the following constraint: + Coercible (Either Int (Fix (Either Int))) (Fix (Either Age)) • In the expression: coerce :: Fix (Either Int) -> Fix (Either Age) In an equation for ‘foo6’: foo6 = coerce :: Fix (Either Int) -> Fix (Either Age) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a6edda869870da4fe7d5c726e00f80cd... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a6edda869870da4fe7d5c726e00f80cd... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Peyton Jones (@simonpj)