Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC
Commits:
-
f42facf3
by Apoorv Ingle at 2025-11-25T17:36:39-06:00
2 changed files:
Changes:
| ... | ... | @@ -335,7 +335,7 @@ tcExpr e@(HsLit x lit) res_ty |
| 335 | 335 | ; tcWrapResult e (HsLit x (convertLit lit)) lit_ty res_ty }
|
| 336 | 336 | |
| 337 | 337 | tcExpr (HsPar x expr) res_ty
|
| 338 | - = do { expr' <- tcMonoLExpr expr res_ty
|
|
| 338 | + = do { expr' <- tcMonoLExprNC expr res_ty
|
|
| 339 | 339 | ; return (HsPar x expr') }
|
| 340 | 340 | |
| 341 | 341 | tcExpr (HsPragE x prag expr) res_ty
|
| ... | ... | @@ -42,7 +42,7 @@ import GHC.Prelude |
| 42 | 42 | import {-# SOURCE #-} GHC.Tc.Gen.Expr( tcSyntaxOp, tcInferRho, tcInferRhoFRRNC
|
| 43 | 43 | , tcMonoLExprNC, tcMonoLExpr, tcExpr
|
| 44 | 44 | , tcCheckMonoExpr, tcCheckMonoExprNC
|
| 45 | - , tcCheckPolyExpr, tcPolyExpr )
|
|
| 45 | + , tcCheckPolyExpr, tcPolyLExpr )
|
|
| 46 | 46 | |
| 47 | 47 | import GHC.Rename.Utils ( bindLocalNames )
|
| 48 | 48 | import GHC.Tc.Errors.Types
|
| ... | ... | @@ -420,15 +420,10 @@ tcDoStmts mDoExpr ss@(L _ stmts) res_ty |
| 420 | 420 | }
|
| 421 | 421 | |
| 422 | 422 | tcBody :: LHsExpr GhcRn -> ExpRhoType -> TcM (LHsExpr GhcTc)
|
| 423 | -tcBody (L lspan e) res_ty
|
|
| 424 | - = L lspan <$>
|
|
| 425 | - do { traceTc "tcBody" (ppr res_ty)
|
|
| 426 | - ; setSrcSpanA lspan $
|
|
| 427 | - addErrCtxt (ExprCtxt e) $
|
|
| 428 | - -- We want the right hand side of a match or an equation
|
|
| 429 | - -- to always get printed in the error context
|
|
| 430 | - tcPolyExpr e res_ty
|
|
| 431 | - }
|
|
| 423 | +tcBody body res_ty
|
|
| 424 | + = do { traceTc "tcBody" (ppr res_ty)
|
|
| 425 | + ; tcPolyLExpr body res_ty
|
|
| 426 | + }
|
|
| 432 | 427 | |
| 433 | 428 | {-
|
| 434 | 429 | ************************************************************************
|