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

Commits:

3 changed files:

Changes:

  • compiler/GHC/Tc/Errors/Ppr.hs
    ... ... @@ -5327,12 +5327,10 @@ pprArising :: CtLoc -> SDoc
    5327 5327
     -- Used for the main, top-level error message
    
    5328 5328
     -- We've done special processing for TypeEq, KindEq, givens
    
    5329 5329
     pprArising ct_loc
    
    5330
    -  | in_generated_code = empty  -- See Note ["Arising from" messages in generated code]
    
    5331 5330
       | suppress_origin   = empty
    
    5332 5331
       | otherwise         = pprCtOrigin orig
    
    5333 5332
       where
    
    5334 5333
         orig = ctLocOrigin ct_loc
    
    5335
    -    in_generated_code = ctLocEnvInGeneratedCode (ctLocEnv ct_loc)
    
    5336 5334
         suppress_origin
    
    5337 5335
           | isGivenOrigin orig = True
    
    5338 5336
           | otherwise          = case orig of
    

  • compiler/GHC/Tc/Gen/Expr.hs
    ... ... @@ -295,7 +295,7 @@ tcExpr :: HsExpr GhcRn
    295 295
     -- These constructors are the union of
    
    296 296
     --   - ones taken apart by GHC.Tc.Gen.Head.splitHsApps
    
    297 297
     --   - ones understood by GHC.Tc.Gen.Head.tcInferAppHead_maybe
    
    298
    --- See Note [Application chains and heads] in GHC.Tc.Gen.Ap
    
    298
    +-- See Note [Application chains and heads] in GHC.Tc.Gen.App
    
    299 299
     tcExpr e@(HsVar {})              res_ty = tcApp (exprCtOrigin e) e res_ty
    
    300 300
     tcExpr e@(HsApp {})              res_ty = tcApp (exprCtOrigin e) e res_ty
    
    301 301
     tcExpr e@(OpApp {})              res_ty = tcApp (exprCtOrigin e) e res_ty
    

  • testsuite/tests/indexed-types/should_fail/T5439.stderr
    1
    -
    
    2 1
     T5439.hs:83:33: error: [GHC-83865]
    
    3 2
         • Couldn't match expected type: Attempt (HElemOf rs)
    
    4 3
                       with actual type: Attempt (HHead (HDrop n0 l0))
    
    ... ... @@ -6,8 +5,7 @@ T5439.hs:83:33: error: [GHC-83865]
    6 5
         • Probable cause: ‘($)’ is applied to too few arguments
    
    7 6
           In the second argument of ‘($)’, namely
    
    8 7
             ‘inj $ Failure (e :: SomeException)’
    
    9
    -      In a stmt of a 'do' block:
    
    10
    -        c <- complete ev $ inj $ Failure (e :: SomeException)
    
    8
    +      In the expression: complete ev $ inj $ Failure (e :: SomeException)
    
    11 9
           In the expression:
    
    12 10
             do c <- complete ev $ inj $ Failure (e :: SomeException)
    
    13 11
                return $ c || not first
    
    ... ... @@ -28,5 +26,5 @@ T5439.hs:83:39: error: [GHC-83865]
    28 26
             ‘Failure (e :: SomeException)’
    
    29 27
           In the second argument of ‘($)’, namely
    
    30 28
             ‘inj $ Failure (e :: SomeException)’
    
    31
    -      In a stmt of a 'do' block:
    
    32
    -        c <- complete ev $ inj $ Failure (e :: SomeException)
    29
    +      In the expression: complete ev $ inj $ Failure (e :: SomeException)
    
    30
    +