summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Opt/ConstantFold.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/ConstantFold.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/ConstantFold.hs')
-rw-r--r--compiler/GHC/Core/Opt/ConstantFold.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs
index 81dd594090..3d36368d5b 100644
--- a/compiler/GHC/Core/Opt/ConstantFold.hs
+++ b/compiler/GHC/Core/Opt/ConstantFold.hs
@@ -1810,7 +1810,7 @@ tagToEnumRule = do
-- See Note [tagToEnum#]
_ -> warnPprTrace True "tagToEnum# on non-enumeration type" (ppr ty) $
- return $ mkRuntimeErrorApp rUNTIME_ERROR_ID ty "tagToEnum# on non-enumeration type"
+ return $ mkImpossibleExpr ty "tagToEnum# on non-enumeration type"
------------------------------
dataToTagRule :: RuleM CoreExpr