Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC

Commits:

22 changed files:

Changes:

  • testsuite/tests/deSugar/should_compile/T10662.stderr
    1
    -
    
    2
    -T10662.hs:3:3: warning: [GHC-81995] [-Wunused-do-bind (in -Wall)]
    
    1
    +T10662.hs:2:8: warning: [GHC-81995] [-Wunused-do-bind (in -Wall)]
    
    3 2
         A do-notation statement discarded a result of type ‘String’
    
    4 3
         Suggested fix:
    
    5 4
           Suppress this warning by saying
    
    6 5
             ‘_ <- return $ let a = "hello" in a’
    
    6
    +

  • testsuite/tests/deSugar/should_compile/T3263-1.stderr
    1
    -
    
    2
    -T3263-1.hs:25:3: warning: [GHC-81995] [-Wunused-do-bind (in -Wall)]
    
    1
    +T3263-1.hs:24:6: warning: [GHC-81995] [-Wunused-do-bind (in -Wall)]
    
    3 2
         A do-notation statement discarded a result of type ‘Int’
    
    4 3
         Suggested fix: Suppress this warning by saying ‘_ <- nonNullM’
    
    5 4
     
    
    6
    -T3263-1.hs:35:3: warning: [GHC-81995] [-Wunused-do-bind (in -Wall)]
    
    5
    +T3263-1.hs:34:6: warning: [GHC-81995] [-Wunused-do-bind (in -Wall)]
    
    7 6
         A do-notation statement discarded a result of type ‘Int’
    
    8 7
         Suggested fix: Suppress this warning by saying ‘_ <- nonNullM’
    
    8
    +

  • testsuite/tests/deSugar/should_compile/T3263-2.stderr
    1
    -
    
    2
    -T3263-2.hs:25:3: warning: [GHC-08838] [-Wwrong-do-bind (in -Wdefault)]
    
    1
    +T3263-2.hs:24:6: warning: [GHC-08838] [-Wwrong-do-bind (in -Wdefault)]
    
    3 2
         A do-notation statement discarded a result of type ‘m Int’
    
    4 3
         Suggested fix:
    
    5 4
           Suppress this warning by saying ‘_ <- return (return 10 :: m Int)’
    
    6 5
     
    
    7
    -T3263-2.hs:37:3: warning: [GHC-08838] [-Wwrong-do-bind (in -Wdefault)]
    
    6
    +T3263-2.hs:36:6: warning: [GHC-08838] [-Wwrong-do-bind (in -Wdefault)]
    
    8 7
         A do-notation statement discarded a result of type ‘m Int’
    
    9 8
         Suggested fix:
    
    10 9
           Suppress this warning by saying ‘_ <- return (return 10 :: m Int)’
    
    10
    +

  • testsuite/tests/default/default-fail05.stderr
    ... ... @@ -11,7 +11,7 @@ default-fail05.hs:11:10: error: [GHC-39999]
    11 11
             (use -fprint-potential-instances to see them all)
    
    12 12
         • In the first argument of ‘($)’, namely ‘toList’
    
    13 13
           In the first argument of ‘print’, namely ‘(toList $ pure 21)’
    
    14
    -      In a stmt of a 'do' block: print (toList $ pure 21)
    
    14
    +      In the expression: print (toList $ pure 21)
    
    15 15
     
    
    16 16
     default-fail05.hs:11:19: error: [GHC-39999]
    
    17 17
         • Ambiguous type variable ‘t0’ arising from a use of ‘pure’
    
    ... ... @@ -25,7 +25,7 @@ default-fail05.hs:11:19: error: [GHC-39999]
    25 25
             (use -fprint-potential-instances to see them all)
    
    26 26
         • In the second argument of ‘($)’, namely ‘pure 21’
    
    27 27
           In the first argument of ‘print’, namely ‘(toList $ pure 21)’
    
    28
    -      In a stmt of a 'do' block: print (toList $ pure 21)
    
    28
    +      In the expression: print (toList $ pure 21)
    
    29 29
     
    
    30 30
     default-fail05.hs:12:3: error: [GHC-39999]
    
    31 31
         • Ambiguous type variable ‘t1’ arising from a use of ‘traverse’
    

  • testsuite/tests/indexed-types/should_fail/T2693.stderr
    1
    -
    
    2 1
     T2693.hs:12:15: error: [GHC-83865]
    
    3 2
         • Couldn't match expected type: (a8, b1)
    
    4 3
                       with actual type: TFn a6
    
    5
    -        The type variable ‘a6’ is ambiguous
    
    4
    +      The type variable ‘a6’ is ambiguous
    
    6 5
         • In the first argument of ‘fst’, namely ‘x’
    
    7 6
           In the first argument of ‘(+)’, namely ‘fst x’
    
    8 7
           In the expression: fst x + fst x
    
    ... ... @@ -11,7 +10,7 @@ T2693.hs:12:15: error: [GHC-83865]
    11 10
     T2693.hs:12:23: error: [GHC-83865]
    
    12 11
         • Couldn't match expected type: (a8, b2)
    
    13 12
                       with actual type: TFn a7
    
    14
    -        The type variable ‘a7’ is ambiguous
    
    13
    +      The type variable ‘a7’ is ambiguous
    
    15 14
         • In the first argument of ‘fst’, namely ‘x’
    
    16 15
           In the second argument of ‘(+)’, namely ‘fst x’
    
    17 16
           In the expression: fst x + fst x
    
    ... ... @@ -20,7 +19,7 @@ T2693.hs:12:23: error: [GHC-83865]
    20 19
     T2693.hs:19:15: error: [GHC-83865]
    
    21 20
         • Couldn't match expected type: (a5, b0)
    
    22 21
                       with actual type: TFn a2
    
    23
    -        The type variable ‘a2’ is ambiguous
    
    22
    +      The type variable ‘a2’ is ambiguous
    
    24 23
         • In the first argument of ‘fst’, namely ‘x’
    
    25 24
           In the first argument of ‘(+)’, namely ‘fst x’
    
    26 25
           In the expression: fst x + snd x
    
    ... ... @@ -29,7 +28,7 @@ T2693.hs:19:15: error: [GHC-83865]
    29 28
     T2693.hs:19:23: error: [GHC-83865]
    
    30 29
         • Couldn't match expected type: (a4, a5)
    
    31 30
                       with actual type: TFn a3
    
    32
    -        The type variable ‘a3’ is ambiguous
    
    31
    +      The type variable ‘a3’ is ambiguous
    
    33 32
         • In the first argument of ‘snd’, namely ‘x’
    
    34 33
           In the second argument of ‘(+)’, namely ‘snd x’
    
    35 34
           In the expression: fst x + snd x
    
    ... ... @@ -40,10 +39,11 @@ T2693.hs:29:20: error: [GHC-83865]
    40 39
                          with: PVR a1
    
    41 40
           Expected: () -> Maybe (PVR a1)
    
    42 41
             Actual: () -> Maybe (TFn a0)
    
    43
    -        The type variable ‘a0’ is ambiguous
    
    42
    +      The type variable ‘a0’ is ambiguous
    
    44 43
         • In the first argument of ‘mapM’, namely ‘g’
    
    45
    -      In a stmt of a 'do' block: pvs <- mapM g undefined
    
    44
    +      In the expression: mapM g undefined
    
    46 45
           In the expression:
    
    47 46
             do pvs <- mapM g undefined
    
    48 47
                let n = (map pvrX pvs) `min` (map pvrX pvs)
    
    49 48
                undefined
    
    49
    +

  • testsuite/tests/plugins/test-defaulting-plugin.stderr
    1
    -
    
    2 1
     test-defaulting-plugin.hs:28:11: warning: [GHC-18042] [-Wtype-defaults (in -Wall)]
    
    3 2
         • Defaulting the type variable ‘a0’ to type ‘0’ in the following constraint
    
    4 3
             KnownNat a0 arising from a use of ‘q’
    
    5 4
         • In the first argument of ‘(+)’, namely ‘q’
    
    6 5
           In the second argument of ‘($)’, namely ‘q + w’
    
    7
    -      In a stmt of a 'do' block: print $ q + w
    
    6
    +      In the expression: print $ q + w
    
    8 7
     
    
    9 8
     test-defaulting-plugin.hs:28:15: warning: [GHC-18042] [-Wtype-defaults (in -Wall)]
    
    10 9
         • Defaulting the type variable ‘a0’ to type ‘2’ in the following constraints
    
    ... ... @@ -16,7 +15,7 @@ test-defaulting-plugin.hs:28:15: warning: [GHC-18042] [-Wtype-defaults (in -Wall
    16 15
               arising from a use of ‘w’ at test-defaulting-plugin.hs:28:15
    
    17 16
         • In the second argument of ‘(+)’, namely ‘w’
    
    18 17
           In the second argument of ‘($)’, namely ‘q + w’
    
    19
    -      In a stmt of a 'do' block: print $ q + w
    
    18
    +      In the expression: print $ q + w
    
    20 19
     
    
    21 20
     test-defaulting-plugin.hs:29:11: warning: [GHC-18042] [-Wtype-defaults (in -Wall)]
    
    22 21
         • Defaulting the type variable ‘b0’ to type ‘0’ in the following constraint
    
    ... ... @@ -35,3 +34,4 @@ test-defaulting-plugin.hs:29:11: warning: [GHC-18042] [-Wtype-defaults (in -Wall
    35 34
           In the expression:
    
    36 35
             do print $ q + w
    
    37 36
                print $ mc Proxy Proxy
    
    37
    +

  • testsuite/tests/polykinds/T13393.stderr
    1
    -
    
    2 1
     T13393.hs:61:3: error: [GHC-39999]
    
    3 2
         • Ambiguous type variable ‘t0’ arising from a use of ‘mapM’
    
    4 3
           prevents the constraint ‘(Traversable t0)’ from being solved.
    
    ... ... @@ -11,7 +10,7 @@ T13393.hs:61:3: error: [GHC-39999]
    11 10
             ...plus four others
    
    12 11
             ...plus 27 instances involving out-of-scope types
    
    13 12
             (use -fprint-potential-instances to see them all)
    
    14
    -    • In a stmt of a 'do' block:
    
    13
    +    • In the expression:
    
    15 14
             mapM putBackLeftOverInputAndReturnOutput undefined
    
    16 15
           In the expression:
    
    17 16
             do mapM putBackLeftOverInputAndReturnOutput undefined
    
    ... ... @@ -24,3 +23,4 @@ T13393.hs:61:3: error: [GHC-39999]
    24 23
                     putBackLeftOverInputAndReturnOutput (MkEncodeResult x)
    
    25 24
                       = do leftOvers .= x
    
    26 25
                            ....
    
    26
    +

  • testsuite/tests/printer/T17697.stderr
    1
    -T17697.hs:6:5: warning: [GHC-88464] [-Wdeferred-out-of-scope-variables (in -Wdefault)]
    
    2
    -    Variable not in scope: threadDelay :: t0 -> IO a0
    
    3
    -
    
    4
    -T17697.hs:6:5: warning: [GHC-81995] [-Wunused-do-bind (in -Wall)]
    
    1
    +T17697.hs:5:8: warning: [GHC-81995] [-Wunused-do-bind (in -Wall)]
    
    5 2
         A do-notation statement discarded a result of type
    
    6 3
           ‘GHC.Internal.Types.ZonkAny 1’
    
    7 4
         Suggested fix: Suppress this warning by saying ‘_ <- threadDelay 1’
    
    8 5
     
    
    6
    +T17697.hs:6:5: warning: [GHC-88464] [-Wdeferred-out-of-scope-variables (in -Wdefault)]
    
    7
    +    Variable not in scope: threadDelay :: t0 -> IO a0
    
    8
    +

  • testsuite/tests/typecheck/should_compile/T14590.stderr
    1
    -T14590.hs:4:11: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    
    1
    +T14590.hs:4:13: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    
    2 2
         • Found hole: _ :: Int -> Int -> Int
    
    3
    -    • In the expression: x `_`
    
    4
    -      In the expression: (x `_`) y
    
    3
    +    • In the expression: (x `_`) y
    
    5 4
           In an equation for ‘f1’: f1 x y = (x `_`) y
    
    6 5
         • Relevant bindings include
    
    7 6
             y :: Int (bound at T14590.hs:4:6)
    
    ... ... @@ -85,11 +84,10 @@ T14590.hs:4:11: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    85 84
               (imported from ‘Prelude’ at T14590.hs:1:8-13
    
    86 85
                (and originally defined in ‘GHC.Internal.Base’))
    
    87 86
     
    
    88
    -T14590.hs:5:11: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    
    87
    +T14590.hs:5:13: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    
    89 88
         • Found hole: _a :: Int -> Int -> Int
    
    90 89
           Or perhaps ‘_a’ is mis-spelled, or not in scope
    
    91
    -    • In the expression: x `_a`
    
    92
    -      In the expression: (x `_a`) y
    
    90
    +    • In the expression: (x `_a`) y
    
    93 91
           In an equation for ‘f2’: f2 x y = (x `_a`) y
    
    94 92
         • Relevant bindings include
    
    95 93
             y :: Int (bound at T14590.hs:5:6)
    

  • testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr
    ... ... @@ -11,7 +11,7 @@ valid_hole_fits.hs:9:6: warning: [GHC-88464] [-Wdeferred-out-of-scope-variables
    11 11
     
    
    12 12
     valid_hole_fits.hs:17:17: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
    
    13 13
         • Found hole: _ :: Int -> IO Int
    
    14
    -    • In a stmt of a 'do' block: y <- _ x
    
    14
    +    • In the expression: _ x
    
    15 15
           In the expression:
    
    16 16
             do x <- a 0
    
    17 17
                y <- _ x
    

  • testsuite/tests/typecheck/should_fail/DoExpansion1.stderr
    1
    -
    
    2 1
     DoExpansion1.hs:7:19: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)]
    
    3 2
         • No instance for ‘Num String’ arising from the literal ‘1’
    
    4 3
         • In the first argument of ‘putStrLn’, namely ‘1’
    
    ... ... @@ -23,7 +22,7 @@ DoExpansion1.hs:15:54: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefaul
    23 22
     DoExpansion1.hs:19:21: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)]
    
    24 23
         • No instance for ‘Num String’ arising from the literal ‘1’
    
    25 24
         • In the first argument of ‘putStrLn’, namely ‘1’
    
    26
    -      In a stmt of a 'do' block: putStrLn 1
    
    25
    +      In the expression: putStrLn 1
    
    27 26
           In the expression:
    
    28 27
             do putStrLn 1
    
    29 28
                putStrLn "r2"
    
    ... ... @@ -32,7 +31,7 @@ DoExpansion1.hs:19:21: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefaul
    32 31
     DoExpansion1.hs:25:21: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)]
    
    33 32
         • No instance for ‘Num String’ arising from the literal ‘2’
    
    34 33
         • In the first argument of ‘putStrLn’, namely ‘2’
    
    35
    -      In a stmt of a 'do' block: putStrLn 2
    
    34
    +      In the expression: putStrLn 2
    
    36 35
           In the expression:
    
    37 36
             do putStrLn "r1"
    
    38 37
                putStrLn 2
    
    ... ... @@ -46,3 +45,4 @@ DoExpansion1.hs:32:21: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefaul
    46 45
             do putStrLn "r1"
    
    47 46
                putStrLn "r2"
    
    48 47
                putStrLn 3
    
    48
    +

  • testsuite/tests/typecheck/should_fail/DoExpansion2.stderr
    1
    -
    
    2 1
     DoExpansion2.hs:13:20: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)]
    
    3 2
         • Couldn't match expected type ‘Int’ with actual type ‘Char’
    
    4 3
         • In the first argument of ‘(+)’, namely ‘x’
    
    ... ... @@ -57,7 +56,7 @@ DoExpansion2.hs:34:22: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefaul
    57 56
                       with actual type: IO String
    
    58 57
         • The function ‘getVal’ is applied to two visible arguments,
    
    59 58
             but its type ‘Int -> IO String’ has only one
    
    60
    -      In a stmt of a 'do' block: Just x <- getVal 3 4
    
    59
    +      In the expression: getVal 3 4
    
    61 60
           In the expression:
    
    62 61
             do Just x <- getVal 3 4
    
    63 62
                return x
    
    ... ... @@ -71,3 +70,4 @@ DoExpansion2.hs:39:19: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefaul
    71 70
           In the expression:
    
    72 71
             do x <- getVal 3
    
    73 72
                return x
    
    73
    +

  • testsuite/tests/typecheck/should_fail/T10971d.stderr
    1
    -
    
    2 1
     T10971d.hs:4:14: error: [GHC-83865]
    
    3 2
         • Couldn't match expected type: [a0]
    
    4 3
                       with actual type: Maybe a3
    
    5 4
         • In the first argument of ‘f’, namely ‘(Just 1)’
    
    6 5
           In the second argument of ‘($)’, namely ‘f (Just 1)’
    
    7
    -      In a stmt of a 'do' block: print $ f (Just 1)
    
    6
    +      In the expression: print $ f (Just 1)
    
    8 7
     
    
    9 8
     T10971d.hs:5:19: error: [GHC-83865]
    
    10 9
         • Couldn't match expected type: [b0]
    
    11 10
                       with actual type: Maybe a4
    
    12 11
         • In the second argument of ‘g’, namely ‘(Just 5)’
    
    13 12
           In the second argument of ‘($)’, namely ‘g (+ 1) (Just 5)’
    
    14
    -      In a stmt of a 'do' block: print $ g (+ 1) (Just 5)
    
    13
    +      In the expression: print $ g (+ 1) (Just 5)
    
    15 14
     
    
    16 15
     T10971d.hs:6:23: error: [GHC-83865]
    
    17 16
         • Couldn't match expected type: [a2]
    
    ... ... @@ -19,3 +18,4 @@ T10971d.hs:6:23: error: [GHC-83865]
    19 18
         • In the second argument of ‘h’, namely ‘Nothing’
    
    20 19
           In the second argument of ‘($)’, namely ‘h (const 5) Nothing’
    
    21 20
           In a stmt of a 'do' block: print $ h (const 5) Nothing
    
    21
    +

  • testsuite/tests/typecheck/should_fail/T13311.stderr
    1
    -
    
    2 1
     T13311.hs:9:3: error: [GHC-83865]
    
    3 2
         • Couldn't match expected type: IO a0
    
    4 3
                       with actual type: Maybe a1 -> Maybe b0
    
    5 4
         • Probable cause: ‘f’ is applied to too few arguments
    
    6
    -      In a stmt of a 'do' block: f
    
    5
    +      In the expression: f
    
    7 6
           In the expression:
    
    8 7
             do f
    
    9 8
                putChar 'a'
    
    10 9
           In an equation for ‘g’:
    
    11 10
               g = do f
    
    12 11
                      putChar 'a'
    
    12
    +

  • testsuite/tests/typecheck/should_fail/T24064.stderr
    1
    -
    
    2 1
     T24064.hs:42:3: error: [GHC-25897]
    
    3 2
         • Could not deduce ‘m ~ X e0’
    
    4 3
           from the context: (C2 m, F2 m ~ Y)
    
    ... ... @@ -11,7 +10,7 @@ T24064.hs:42:3: error: [GHC-25897]
    11 10
             the type signature for:
    
    12 11
               test :: forall (m :: * -> *). (C2 m, F2 m ~ Y) => m ()
    
    13 12
             at T24064.hs:40:1-32
    
    14
    -    • In a stmt of a 'do' block: fun1
    
    13
    +    • In the expression: fun1
    
    15 14
           In the expression:
    
    16 15
             do fun1
    
    17 16
                fun2
    
    ... ... @@ -24,3 +23,4 @@ T24064.hs:42:3: error: [GHC-25897]
    24 23
                      g fun3
    
    25 24
                      ....
    
    26 25
         • Relevant bindings include test :: m () (bound at T24064.hs:41:1)
    
    26
    +

  • testsuite/tests/typecheck/should_fail/T3613.stderr
    1
    -
    
    2 1
     T3613.hs:14:20: error: [GHC-83865]
    
    3 2
         • Couldn't match type ‘IO’ with ‘Maybe’
    
    4 3
           Expected: Maybe ()
    
    ... ... @@ -11,7 +10,7 @@ T3613.hs:17:24: error: [GHC-83865]
    11 10
         • Couldn't match type ‘IO’ with ‘Maybe’
    
    12 11
           Expected: Maybe ()
    
    13 12
             Actual: IO ()
    
    14
    -    • In a stmt of a 'do' block: bar
    
    13
    +    • In the expression: bar
    
    15 14
           In the first argument of ‘fooThen’, namely
    
    16 15
             ‘(do bar
    
    17 16
                  undefined)’
    
    ... ... @@ -19,3 +18,4 @@ T3613.hs:17:24: error: [GHC-83865]
    19 18
             fooThen
    
    20 19
               (do bar
    
    21 20
                   undefined)
    
    21
    +

  • testsuite/tests/typecheck/should_fail/T7851.stderr
    1
    -
    
    2 1
     T7851.hs:5:10: error: [GHC-83865]
    
    3 2
         • Couldn't match expected type: IO a0
    
    4 3
                       with actual type: a1 -> IO ()
    
    5 4
         • Probable cause: ‘print’ is applied to too few arguments
    
    6
    -      In a stmt of a 'do' block: print
    
    5
    +      In the expression: print
    
    7 6
           In the expression:
    
    8 7
             do print
    
    9 8
                print "Hello"
    
    ... ... @@ -11,3 +10,4 @@ T7851.hs:5:10: error: [GHC-83865]
    11 10
               bar
    
    12 11
                 = do print
    
    13 12
                      print "Hello"
    
    13
    +

  • testsuite/tests/typecheck/should_fail/T8603.stderr
    1
    -
    
    2 1
     T8603.hs:33:17: error: [GHC-18872]
    
    3 2
         • Couldn't match kind ‘* -> *’ with ‘*’
    
    4 3
           When matching types
    
    ... ... @@ -10,7 +9,7 @@ T8603.hs:33:17: error: [GHC-18872]
    10 9
             but its type ‘(Control.Monad.Trans.Class.MonadTrans t, Monad m) =>
    
    11 10
                           m a -> t m a’
    
    12 11
             has only one
    
    13
    -      In a stmt of a 'do' block: prize <- lift uniform [1, 2, 3]
    
    12
    +      In the expression: lift uniform [1, 2, 3]
    
    14 13
           In the expression:
    
    15 14
             do prize <- lift uniform [1, 2, ....]
    
    16 15
                return False
    
    ... ... @@ -21,9 +20,10 @@ T8603.hs:33:22: error: [GHC-83865]
    21 20
           Expected: [a1] -> StateT s RV a0
    
    22 21
             Actual: [a1] -> RV a1
    
    23 22
         • In the first argument of ‘lift’, namely ‘uniform’
    
    24
    -      In a stmt of a 'do' block: prize <- lift uniform [1, 2, 3]
    
    23
    +      In the expression: lift uniform [1, 2, 3]
    
    25 24
           In the expression:
    
    26 25
             do prize <- lift uniform [1, 2, ....]
    
    27 26
                return False
    
    28 27
         • Relevant bindings include
    
    29 28
             testRVState1 :: RVState s Bool (bound at T8603.hs:32:1)
    
    29
    +

  • testsuite/tests/typecheck/should_fail/T9612.stderr
    1
    -
    
    2 1
     T9612.hs:16:9: error: [GHC-18872]
    
    3 2
         • Couldn't match type: [(Int, a)]
    
    4 3
                          with: (Int, a)
    
    ... ... @@ -6,7 +5,7 @@ T9612.hs:16:9: error: [GHC-18872]
    6 5
               constraint ‘MonadWriter (Int, a) (WriterT [(Int, a)] Identity)’
    
    7 6
                 arising from a use of ‘tell’
    
    8 7
               instance ‘MonadWriter w (WriterT w m)’ at T9612.hs:20:10-59
    
    9
    -    • In a stmt of a 'do' block: tell (n, x)
    
    8
    +    • In the expression: tell (n, x)
    
    10 9
           In the expression:
    
    11 10
             do tell (n, x)
    
    12 11
                return (1, y)
    
    ... ... @@ -19,3 +18,4 @@ T9612.hs:16:9: error: [GHC-18872]
    19 18
             y :: a (bound at T9612.hs:14:3)
    
    20 19
             f :: a -> (Int, a) -> Writer [(Int, a)] (Int, a)
    
    21 20
               (bound at T9612.hs:14:1)
    
    21
    +

  • testsuite/tests/typecheck/should_fail/tcfail128.stderr
    1
    -
    
    2 1
     tcfail128.hs:18:16: error: [GHC-39999]
    
    3 2
         • Ambiguous type variable ‘b0’ arising from a use of ‘thaw’
    
    4 3
           prevents the constraint ‘(Data.Array.Base.MArray
    
    ... ... @@ -6,7 +5,7 @@ tcfail128.hs:18:16: error: [GHC-39999]
    6 5
           Probable fix: use a type annotation to specify what ‘b0’ should be.
    
    7 6
           one instance involving out-of-scope types
    
    8 7
           (use -fprint-potential-instances to see them all)
    
    9
    -    • In a stmt of a 'do' block: v <- thaw tmp
    
    8
    +    • In the expression: thaw tmp
    
    10 9
           In the expression:
    
    11 10
             do let sL = ...
    
    12 11
                    dim = length sL
    
    ... ... @@ -19,3 +18,4 @@ tcfail128.hs:18:16: error: [GHC-39999]
    19 18
                          ....
    
    20 19
                      v <- thaw tmp
    
    21 20
                      return ()
    
    21
    +

  • testsuite/tests/typecheck/should_fail/tcfail168.stderr
    1
    -
    
    2 1
     tcfail168.hs:7:11: error: [GHC-83865]
    
    3 2
         • Couldn't match expected type: IO a0
    
    4 3
                       with actual type: Char -> IO ()
    
    5 4
         • Probable cause: ‘putChar’ is applied to too few arguments
    
    6
    -      In a stmt of a 'do' block: putChar
    
    5
    +      In the expression: putChar
    
    7 6
           In the expression:
    
    8 7
             do putChar
    
    9 8
                putChar 'a'
    
    ... ... @@ -16,3 +15,4 @@ tcfail168.hs:7:11: error: [GHC-83865]
    16 15
                      putChar 'a'
    
    17 16
                      putChar 'a'
    
    18 17
                      ....
    
    18
    +

  • testsuite/tests/warnings/should_fail/CaretDiagnostics1.stderr
    1 1
     CaretDiagnostics1.hs:7:8-15: error: [GHC-83865]
    
    2 2
         • Couldn't match expected type ‘IO a0’ with actual type ‘Int’
    
    3 3
         • In the second argument of ‘(+)’, namely ‘(3 :: Int)’
    
    4
    -      In a stmt of a 'do' block:
    
    4
    +      In the expression:
    
    5 5
             10000000000000000000000000000000000000 + 2 + (3 :: Int)
    
    6 6
           In the expression:
    
    7 7
             do 10000000000000000000000000000000000000 + 2 + (3 :: Int)