summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Utils/Monad.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2023-05-12 16:11:39 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2023-05-12 16:12:04 +0100
commit95a15c7e7659505e4d70a004f567a05a7ccf41b2 (patch)
treecdc14a2550fbb0554adaa9311e4c3cd3052d9ad7 /compiler/GHC/Tc/Utils/Monad.hs
parent1e6861dd8612d8f71cc4635c4f73f84f316a6c7e (diff)
downloadhaskell-wip/clean-refactor.tar.gz
Diffstat (limited to 'compiler/GHC/Tc/Utils/Monad.hs')
-rw-r--r--compiler/GHC/Tc/Utils/Monad.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Utils/Monad.hs b/compiler/GHC/Tc/Utils/Monad.hs
index 75b74cbb35..0cd69c95bb 100644
--- a/compiler/GHC/Tc/Utils/Monad.hs
+++ b/compiler/GHC/Tc/Utils/Monad.hs
@@ -1275,10 +1275,13 @@ getCtLocM :: CtOrigin -> Maybe TypeOrKind -> TcM CtLoc
getCtLocM origin t_or_k
= do { env <- getLclEnv
; return (CtLoc { ctl_origin = origin
- , ctl_env = env
+ , ctl_env = mkCtLocEnv env
, ctl_t_or_k = t_or_k
, ctl_depth = initialSubGoalDepth }) }
+mkCtLocEnv :: TcLclEnv -> CtLocEnv
+mkCtLocEnv lcl_env = CtLocEnv
+
setCtLocM :: CtLoc -> TcM a -> TcM a
-- Set the SrcSpan and error context from the CtLoc
setCtLocM (CtLoc { ctl_env = lcl }) thing_inside