Apoorv Ingle pushed to branch wip/ani/precise-fun-loc at Glasgow Haskell Compiler / GHC Commits: d9a967c6 by Apoorv Ingle at 2026-04-05T20:01:51-05:00 make sure 3 error messages are displayed for MonadFailErrors - - - - - 2 changed files: - compiler/GHC/Tc/Types/ErrCtxt.hs - testsuite/tests/monadfail/MonadFailErrors.stderr Changes: ===================================== compiler/GHC/Tc/Types/ErrCtxt.hs ===================================== @@ -373,7 +373,8 @@ data HsCtxt isHsCtxtLandmark :: HsCtxt -> Bool -isHsCtxtLandmark (DerivBindCtxt{}) = True -isHsCtxtLandmark (FunResCtxt{}) = True +isHsCtxtLandmark (DerivBindCtxt{}) = True +isHsCtxtLandmark (FunResCtxt{}) = True isHsCtxtLandmark (VDQWarningCtxt{}) = True +isHsCtxtLandmark (StmtErrCtxtPat{}) = True isHsCtxtLandmark _ = False ===================================== testsuite/tests/monadfail/MonadFailErrors.stderr ===================================== @@ -14,6 +14,10 @@ MonadFailErrors.hs:14:5: error: [GHC-39999] In the expression: do Just x <- undefined undefined + In an equation for ‘general’: + general + = do Just x <- undefined + undefined MonadFailErrors.hs:28:5: error: [GHC-39999] • No instance for ‘MonadFail Identity’ @@ -23,6 +27,10 @@ MonadFailErrors.hs:28:5: error: [GHC-39999] In the expression: do Just x <- undefined undefined + In an equation for ‘identity’: + identity + = do Just x <- undefined + undefined MonadFailErrors.hs:42:5: error: [GHC-39999] • No instance for ‘MonadFail ((->) r)’ @@ -32,4 +40,8 @@ MonadFailErrors.hs:42:5: error: [GHC-39999] In the expression: do Just x <- undefined undefined + In an equation for ‘reader’: + reader + = do Just x <- undefined + undefined View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d9a967c67e7f7eb48353d3c19be639f0... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d9a967c67e7f7eb48353d3c19be639f0... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Apoorv Ingle (@ani)