summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/T15539.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rename/should_fail/T15539.hs')
-rw-r--r--testsuite/tests/rename/should_fail/T15539.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T15539.hs b/testsuite/tests/rename/should_fail/T15539.hs
new file mode 100644
index 0000000000..d1b5a37e7b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T15539.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE RankNTypes #-}
+module T15539 where
+
+foo :: String
+foo = show a
+ where a = baz
+
+-- We get top level constraints
+-- Show a
+-- forall . <not in scope baz>
+-- We want the insoluble non-in-scope error to suppress
+-- the Show a, just as it does if the whole things is nested
+
+bar :: Int
+bar = 1
+
+bam = putStrLn foo