diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-02-02 10:43:20 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-02-04 20:36:20 -0500 |
commit | bf495f7206741c81135c04ce6bb943c4a6729e80 (patch) | |
tree | 8e13ece5e19518d694f1543d4f4c57af5e278d4e | |
parent | a5c7068cc89e8a398eb9c76089875b981a9d830f (diff) | |
download | haskell-bf495f7206741c81135c04ce6bb943c4a6729e80.tar.gz |
Add a missing restoreLclEnv
The commit
commit 18df4013f6eaee0e1de8ebd533f7e96c4ee0ff04
Date: Sat Jan 22 01:12:30 2022 +0000
Define and use restoreLclEnv
omitted to change one setLclEnv to restoreLclEnv, namely
the one in GHC.Tc.Errors.warnRedundantConstraints.
This new commit fixes the omission.
-rw-r--r-- | compiler/GHC/Tc/Errors.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/Errors.hs b/compiler/GHC/Tc/Errors.hs index 82aa8fcc6a..12576437e2 100644 --- a/compiler/GHC/Tc/Errors.hs +++ b/compiler/GHC/Tc/Errors.hs @@ -395,8 +395,8 @@ warnRedundantConstraints ctxt env info ev_vars = return () | SigSkol user_ctxt _ _ <- info - = setLclEnv env $ -- We want to add "In the type signature for f" - -- to the error context, which is a bit tiresome + = restoreLclEnv env $ -- We want to add "In the type signature for f" + -- to the error context, which is a bit tiresome setSrcSpan (redundantConstraintsSpan user_ctxt) $ report_redundant_msg True |