summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Opt/SpecConstr.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2022-12-19 17:48:38 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-12-22 07:18:28 +0000
commit6810c15e71cc9f3c590f4c37c37e35d1fd8009d1 (patch)
tree1777ebbf2c62a90ea776fc0efe106d83b03734fd /compiler/GHC/Core/Opt/SpecConstr.hs
parent3d55d8ab51ece43c51055c43c9e7aba77cce46c0 (diff)
downloadhaskell-wip/T22634.tar.gz
Refactor mkRuntimeErrorwip/T22634
This patch fixes #22634. Because we don't have TYPE/CONSTRAINT polymorphism, we need two error functions rather than one. I took the opportunity to rname runtimeError to impossibleError, to line up with mkImpossibleExpr, and avoid confusion with the genuine runtime-error-constructing functions.
Diffstat (limited to 'compiler/GHC/Core/Opt/SpecConstr.hs')
-rw-r--r--compiler/GHC/Core/Opt/SpecConstr.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs
index fed1f32879..157cec6e49 100644
--- a/compiler/GHC/Core/Opt/SpecConstr.hs
+++ b/compiler/GHC/Core/Opt/SpecConstr.hs
@@ -1500,7 +1500,7 @@ scExpr' env (Case scrut b ty alts)
where
sc_con_app con args scrut' -- Known constructor; simplify
= do { let Alt _ bs rhs = findAlt con alts
- `orElse` Alt DEFAULT [] (mkImpossibleExpr ty)
+ `orElse` Alt DEFAULT [] (mkImpossibleExpr ty "SpecConstr")
alt_env' = extendScSubstList env ((b,scrut') : bs `zip` trimConArgs con args)
; scExpr alt_env' rhs }