summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/prog009/ghci.prog009.script
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ghci/prog009/ghci.prog009.script')
-rw-r--r--testsuite/tests/ghci/prog009/ghci.prog009.script36
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/prog009/ghci.prog009.script b/testsuite/tests/ghci/prog009/ghci.prog009.script
new file mode 100644
index 0000000000..6005727d44
--- /dev/null
+++ b/testsuite/tests/ghci/prog009/ghci.prog009.script
@@ -0,0 +1,36 @@
+:! cp A1.hs A.hs
+import Data.List
+:load A
+-- Data.List should still be in scope:
+:t nub
+:module +B
+yan
+:! sleep 1
+:! cp A3.hs A.hs
+:reload
+-- error, context drops to Prelude,Data.List
+-- Data.List should still be in scope:
+:t nub
+:! sleep 1
+:! cp A1.hs A.hs
+:reload
+-- ok again, B should be back in the context
+yan
+-- Data.List should still be in scope:
+:t nub
+:! sleep 1
+:! cp A2.hs A.hs
+:reload
+:show modules
+yan -- error
+
+-- Now testing for bug #2049
+:! cp A3.hs A.hs
+:load A.hs
+-- should fail
+-- Data.List should still be in scope:
+:type nub
+:! sleep 1
+:! cp A1.hs A.hs
+:reload
+yan