summaryrefslogtreecommitdiff
path: root/testsuite/tests/th
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/th
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/th')
-rw-r--r--testsuite/tests/th/TH_exn2.stderr4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/th/TH_exn2.stderr b/testsuite/tests/th/TH_exn2.stderr
index 582928c08b..9d9205056c 100644
--- a/testsuite/tests/th/TH_exn2.stderr
+++ b/testsuite/tests/th/TH_exn2.stderr
@@ -2,5 +2,9 @@
TH_exn2.hs:1:1: error:
Exception when trying to run compile-time code:
Prelude.tail: 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:114:28 in base:GHC.List
+ tail, called at TH_exn2.hs:10:17 in main:TH
Code: (do ds <- [d| |]
return (tail ds))