summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2021-05-26 05:03:52 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-12 12:52:18 -0500
commit31bf380f3925d72a3369978d28d02aaae31f75ef (patch)
tree38afd6818f3f4661c7ec2f560bd249b3408e021a /testsuite/tests/ghci/scripts
parent93783e6a8765e1410d0a14fd5249a995c6759308 (diff)
downloadhaskell-31bf380f3925d72a3369978d28d02aaae31f75ef.tar.gz
Use HasCallStack and error in GHC.List and .NonEmpty
In addition to providing stack traces, the scary HasCallStack will hopefully make people think whether they want to use these functions, i.e. act as a documentation hint that something weird might happen. A single metric increased, which doesn't visibly use any method with `HasCallStack`. ------------------------- Metric Decrease: T9630 Metric Decrease: T19695 T9630 -------------------------
Diffstat (limited to 'testsuite/tests/ghci/scripts')
-rw-r--r--testsuite/tests/ghci/scripts/T10501.stderr5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T10501.stderr b/testsuite/tests/ghci/scripts/T10501.stderr
index 669b72bf45..9d41d0f211 100644
--- a/testsuite/tests/ghci/scripts/T10501.stderr
+++ b/testsuite/tests/ghci/scripts/T10501.stderr
@@ -1,4 +1,9 @@
*** Exception: Prelude.head: empty list
+CallStack (from HasCallStack):
+ error, called at libraries/base/GHC/List.hs:1590:3 in base:GHC.List
+ errorEmptyList, called at libraries/base/GHC/List.hs:74:11 in base:GHC.List
+ badHead, called at libraries/base/GHC/List.hs:70:28 in base:GHC.List
+ head, called at <interactive>:1:10 in interactive:Ghci1
*** Exception: Prelude.undefined
CallStack (from HasCallStack):
undefined, called at <interactive>:1:17 in interactive:Ghci1