summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToByteCode.hs
diff options
context:
space:
mode:
authornineonine <mail4chemik@gmail.com>2022-02-17 00:01:44 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-24 20:25:42 -0500
commit70bafefbfc5fc31d5fad3184fc9bdc623871923b (patch)
tree05110e264743ef4fe0d3ff4347ccf32e0c6e9584 /compiler/GHC/StgToByteCode.hs
parentd0deaaf4241fa236bd8d87abde68a0ad41a7e119 (diff)
downloadhaskell-70bafefbfc5fc31d5fad3184fc9bdc623871923b.tar.gz
ghci: show helpful error message when loading module with SIMD vector operations (#20214)
Previously, when trying to load module with SIMD vector operations, ghci would panic in 'GHC.StgToByteCode.findPushSeq'. Now, a more helpful message is displayed.
Diffstat (limited to 'compiler/GHC/StgToByteCode.hs')
-rw-r--r--compiler/GHC/StgToByteCode.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/GHC/StgToByteCode.hs b/compiler/GHC/StgToByteCode.hs
index 885af12944..a5931c2dd6 100644
--- a/compiler/GHC/StgToByteCode.hs
+++ b/compiler/GHC/StgToByteCode.hs
@@ -784,6 +784,9 @@ findPushSeq (D: rest)
= (PUSH_APPLY_D, 1, rest)
findPushSeq (L: rest)
= (PUSH_APPLY_L, 1, rest)
+findPushSeq argReps
+ | any (`elem` [V16, V32, V64]) argReps
+ = sorry "SIMD vector operations are not available in GHCi"
findPushSeq _
= panic "GHC.StgToByteCode.findPushSeq"