[Git][ghc/ghc][wip/ani/kill-SrcCodeOrigin] make Data instance for ErrCtxtMsg, accept test cases
Apoorv Ingle pushed to branch wip/ani/kill-SrcCodeOrigin at Glasgow Haskell Compiler / GHC Commits: dd34f3ec by Apoorv Ingle at 2026-03-11T17:23:53-05:00 make Data instance for ErrCtxtMsg, accept test cases - - - - - 5 changed files: - compiler/GHC/Hs/Instances.hs - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - testsuite/tests/monadfail/MonadFailErrors.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail9.stderr Changes: ===================================== compiler/GHC/Hs/Instances.hs ===================================== @@ -642,7 +642,7 @@ deriving instance Eq (IE GhcTc) -- TODO: I think we still need instances for StmtCtxt, ExprCtxt and PatCtxt ctors of ErrCtxtMsg instance Data ErrCtxtMsg where gunfold _ _ _ = error "no gunfold for ErrCtxtMsg" - gfoldl _ _ _ = error "no gfoldl for ErrCtxtMsg" + gfoldl _ k z = k z toConstr = error "no toConstr for ErrCtxtMsg" dataTypeOf = error "no dataTypeOf for ErrCtxtMsg" ===================================== testsuite/tests/count-deps/CountDepsAst.stdout ===================================== @@ -143,7 +143,6 @@ GHC.Tc.Types.Rank GHC.Tc.Types.TH GHC.Tc.Types.TcRef GHC.Tc.Utils.TcType -GHC.Tc.Zonk.Monad GHC.Types.Annotations GHC.Types.Arity GHC.Types.Avail ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -164,7 +164,6 @@ GHC.Tc.Types.Rank GHC.Tc.Types.TH GHC.Tc.Types.TcRef GHC.Tc.Utils.TcType -GHC.Tc.Zonk.Monad GHC.Types.Annotations GHC.Types.Arity GHC.Types.Avail ===================================== testsuite/tests/monadfail/MonadFailErrors.stderr ===================================== @@ -1,4 +1,3 @@ - MonadFailErrors.hs:14:5: error: [GHC-39999] • Could not deduce ‘MonadFail m’ arising from a do statement @@ -15,10 +14,6 @@ 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’ @@ -28,10 +23,6 @@ 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)’ @@ -41,7 +32,4 @@ 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 + ===================================== testsuite/tests/parser/should_fail/RecordDotSyntaxFail9.stderr ===================================== @@ -1,7 +1,7 @@ - RecordDotSyntaxFail9.hs:7:11: error: [GHC-18872] • Couldn't match type ‘Int’ with ‘[Char]’ arising from selecting the field ‘foo’ - • In the expression: a.foo :: String + • In the expression: a.foo In a pattern binding: _ = a.foo :: String In a stmt of a 'do' block: let _ = a.foo :: String + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dd34f3ec3d1149030566260c30b0a11a... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dd34f3ec3d1149030566260c30b0a11a... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Apoorv Ingle (@ani)