Simon Peyton Jones pushed to branch wip/T23162-part2 at Glasgow Haskell Compiler / GHC

Commits:

10 changed files:

Changes:

  • compiler/GHC/Tc/Solver/FunDeps.hs
    ... ... @@ -334,9 +334,8 @@ tryDictFunDepsLocal dict_ct@(DictCt { di_cls = cls, di_ev = work_ev })
    334 334
              text "unif =" <+> ppr unif_happened $$ text "eqns = " <+> ppr eqns
    
    335 335
     
    
    336 336
            -- See (DFL1) of Note [Do fundeps last]
    
    337
    -       ; if insoluble          then continueWith True
    
    338
    -         else if unif_happened then startAgainWith (CDictCan dict_ct)
    
    339
    -                               else continueWith False }
    
    337
    +       ; if unif_happened  then startAgainWith (CDictCan dict_ct)
    
    338
    +                           else continueWith insoluble }
    
    340 339
       where
    
    341 340
         work_pred     = ctEvPred work_ev
    
    342 341
         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
    540 539
                                         , text "eqns:" <+> ppr fd_eqns ])
    
    541 540
            ; (insoluble, unif_happened) <- solveFunDeps ev fd_eqns
    
    542 541
     
    
    543
    -       ; if insoluble          then continueWith True
    
    544
    -         else if unif_happened then startAgainWith (CEqCan work_item)
    
    545
    -                               else continueWith False }
    
    542
    +       ; if unif_happened  then startAgainWith (CEqCan work_item)
    
    543
    +                           else continueWith insoluble }
    
    546 544
     
    
    547 545
     -----------------------------------------
    
    548 546
     --  User-defined type families
    

  • testsuite/tests/quantified-constraints/T15316A.stderr
    1
    -
    
    2 1
     T15316A.hs:15:23: error: [GHC-40404]
    
    3 2
         • Reduction stack overflow; size = 201
    
    4
    -      When simplifying the following type: Class a
    
    3
    +      When simplifying the following constraint: Class a
    
    5 4
         • In the third argument of ‘subsume’, namely ‘method’
    
    6 5
           In the expression: subsume p p method
    
    7 6
           In an equation for ‘value’: value p = subsume p p method
    
    ... ... @@ -10,3 +9,4 @@ T15316A.hs:15:23: error: [GHC-40404]
    10 9
           (any upper bound you could choose might fail unpredictably with
    
    11 10
            minor updates to GHC, so disabling the check is recommended if
    
    12 11
            you're sure that type checking should terminate)
    
    12
    +

  • testsuite/tests/quantified-constraints/T17267.stderr
    1
    -
    
    2 1
     T17267.hs:17:12: error: [GHC-40404]
    
    3 2
         • Reduction stack overflow; size = 201
    
    4
    -      When simplifying the following type: a ~ b
    
    3
    +      When simplifying the following constraint: a ~ b
    
    5 4
         • In the expression: r
    
    6 5
           In an equation for ‘oops’: oops r = r
    
    7 6
           In an equation for ‘unsafeCoerce’:
    
    ... ... @@ -15,3 +14,4 @@ T17267.hs:17:12: error: [GHC-40404]
    15 14
           (any upper bound you could choose might fail unpredictably with
    
    16 15
            minor updates to GHC, so disabling the check is recommended if
    
    17 16
            you're sure that type checking should terminate)
    
    17
    +

  • testsuite/tests/quantified-constraints/T17267a.stderr
    1
    -
    
    2 1
     T17267a.hs:18:12: error: [GHC-40404]
    
    3 2
         • Reduction stack overflow; size = 201
    
    4
    -      When simplifying the following type: C a b
    
    3
    +      When simplifying the following constraint: C a b
    
    5 4
         • In the expression: op x
    
    6 5
           In an equation for ‘oops’: oops x = op x
    
    7 6
           In an equation for ‘uc’:
    
    ... ... @@ -15,3 +14,4 @@ T17267a.hs:18:12: error: [GHC-40404]
    15 14
           (any upper bound you could choose might fail unpredictably with
    
    16 15
            minor updates to GHC, so disabling the check is recommended if
    
    17 16
            you're sure that type checking should terminate)
    
    17
    +

  • testsuite/tests/quantified-constraints/T17267b.stderr
    1
    -
    
    2 1
     T17267b.hs:15:12: error: [GHC-40404]
    
    3 2
         • Reduction stack overflow; size = 201
    
    4
    -      When simplifying the following type: a ~ b
    
    3
    +      When simplifying the following constraint: a ~ b
    
    5 4
         • In the expression: x
    
    6 5
           In an equation for ‘oops’: oops x = x
    
    7 6
           In an equation for ‘uc’:
    
    ... ... @@ -15,3 +14,4 @@ T17267b.hs:15:12: error: [GHC-40404]
    15 14
           (any upper bound you could choose might fail unpredictably with
    
    16 15
            minor updates to GHC, so disabling the check is recommended if
    
    17 16
            you're sure that type checking should terminate)
    
    17
    +

  • testsuite/tests/quantified-constraints/T17267c.stderr
    1
    -
    
    2 1
     T17267c.hs:22:14: error: [GHC-40404]
    
    3 2
         • Reduction stack overflow; size = 201
    
    4
    -      When simplifying the following type: C a b
    
    3
    +      When simplifying the following constraint: C a b
    
    5 4
         • In the expression: r
    
    6 5
           In an equation for ‘oops’: oops r = r
    
    7 6
           In an equation for ‘unsafeCoerce’:
    
    ... ... @@ -15,3 +14,4 @@ T17267c.hs:22:14: error: [GHC-40404]
    15 14
           (any upper bound you could choose might fail unpredictably with
    
    16 15
            minor updates to GHC, so disabling the check is recommended if
    
    17 16
            you're sure that type checking should terminate)
    
    17
    +

  • testsuite/tests/quantified-constraints/T17267e.stderr
    1
    -
    
    2 1
     T17267e.hs:16:14: error: [GHC-40404]
    
    3 2
         • Reduction stack overflow; size = 201
    
    4
    -      When simplifying the following type: Show a
    
    3
    +      When simplifying the following constraint: Show a
    
    5 4
         • In the expression: show
    
    6 5
           In an equation for ‘pseudoShow’: pseudoShow = show
    
    7 6
         Suggested fix:
    
    ... ... @@ -9,3 +8,4 @@ T17267e.hs:16:14: error: [GHC-40404]
    9 8
           (any upper bound you could choose might fail unpredictably with
    
    10 9
            minor updates to GHC, so disabling the check is recommended if
    
    11 10
            you're sure that type checking should terminate)
    
    11
    +

  • testsuite/tests/quantified-constraints/T17458.stderr
    1
    -
    
    2 1
     T17458.hs:32:32: error: [GHC-40404]
    
    3 2
         • Reduction stack overflow; size = 201
    
    4
    -      When simplifying the following type: Typeable Void
    
    3
    +      When simplifying the following constraint: Typeable Void
    
    5 4
         • In the expression: eqT
    
    6 5
           In the expression:
    
    7 6
             case eqT of
    
    ... ... @@ -17,3 +16,4 @@ T17458.hs:32:32: error: [GHC-40404]
    17 16
           (any upper bound you could choose might fail unpredictably with
    
    18 17
            minor updates to GHC, so disabling the check is recommended if
    
    19 18
            you're sure that type checking should terminate)
    
    19
    +

  • testsuite/tests/typecheck/should_fail/ContextStack1.stderr
    1
    -
    
    2 1
     ContextStack1.hs:10:5: error: [GHC-40404]
    
    3 2
         • Reduction stack overflow; size = 11
    
    4
    -      When simplifying the following type: Cls [[[[[[[[[[()]]]]]]]]]]
    
    3
    +      When simplifying the following constraint:
    
    4
    +        Cls [[[[[[[[[[[()]]]]]]]]]]]
    
    5 5
         • In the expression: meth
    
    6 6
           In an equation for ‘t’: t = meth
    
    7 7
         Suggested fix:
    
    ... ... @@ -9,3 +9,4 @@ ContextStack1.hs:10:5: error: [GHC-40404]
    9 9
           (any upper bound you could choose might fail unpredictably with
    
    10 10
            minor updates to GHC, so disabling the check is recommended if
    
    11 11
            you're sure that type checking should terminate)
    
    12
    +

  • testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
    ... ... @@ -49,7 +49,8 @@ TcCoercibleFail.hs:30:9: error: [GHC-18872]
    49 49
     
    
    50 50
     TcCoercibleFail.hs:35:8: error: [GHC-40404]
    
    51 51
         • Reduction stack overflow; size = 201
    
    52
    -      When simplifying the following type: Fix (Either Age)
    
    52
    +      When simplifying the following constraint:
    
    53
    +        Coercible (Either Int (Fix (Either Int))) (Fix (Either Age))
    
    53 54
         • In the expression: coerce :: Fix (Either Int) -> Fix (Either Age)
    
    54 55
           In an equation for ‘foo6’:
    
    55 56
               foo6 = coerce :: Fix (Either Int) -> Fix (Either Age)