summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_run/IPLocation.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_run/IPLocation.hs')
-rw-r--r--testsuite/tests/typecheck/should_run/IPLocation.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/IPLocation.hs b/testsuite/tests/typecheck/should_run/IPLocation.hs
index 75575e0d16..964728934e 100644
--- a/testsuite/tests/typecheck/should_run/IPLocation.hs
+++ b/testsuite/tests/typecheck/should_run/IPLocation.hs
@@ -29,9 +29,15 @@ f6 0 = putStrLn $ prettyCallStack ?loc
f6 n = f6 (n-1)
-- recursive functions add a SrcLoc for each recursive call
+f7 :: IO ()
+f7 = putStrLn (prettyCallStack $ id (\_ -> callStack) ())
+ -- shouldn't crash. See #14043.
+
+main :: IO ()
main = do f0
f1
f3 (\ () -> putStrLn $ prettyCallStack ?loc)
f4 (\ () -> putStrLn $ prettyCallStack ?loc)
f5 (\ () -> putStrLn $ prettyCallStack ?loc3)
f6 5
+ f7