[commit: testsuite] master: Test Trac #8639 (just the GHCi version) (0a0ca80)

git at git.haskell.org git at git.haskell.org
Fri Jan 3 16:16:14 UTC 2014


Repository : ssh://git@git.haskell.org/testsuite

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0a0ca8097d52838bf6faa883dfab4f84a7e89527/testsuite

>---------------------------------------------------------------

commit 0a0ca8097d52838bf6faa883dfab4f84a7e89527
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Dec 31 17:07:31 2013 +0000

    Test Trac #8639 (just the GHCi version)


>---------------------------------------------------------------

0a0ca8097d52838bf6faa883dfab4f84a7e89527
 tests/ghci/scripts/T8639.hs     |    4 ++++
 tests/ghci/scripts/T8639.script |   19 +++++++++++++++++++
 tests/ghci/scripts/T8639.stderr |    4 ++++
 tests/ghci/scripts/all.T        |    1 +
 4 files changed, 28 insertions(+)

diff --git a/tests/ghci/scripts/T8639.hs b/tests/ghci/scripts/T8639.hs
new file mode 100644
index 0000000..d3d4c91
--- /dev/null
+++ b/tests/ghci/scripts/T8639.hs
@@ -0,0 +1,4 @@
+module T8639 where
+
+it = True
+bit = 'c'
diff --git a/tests/ghci/scripts/T8639.script b/tests/ghci/scripts/T8639.script
new file mode 100644
index 0000000..a7db172
--- /dev/null
+++ b/tests/ghci/scripts/T8639.script
@@ -0,0 +1,19 @@
+:l T8639.hs
+:t it
+bit
+:t it
+   -- Gets the last thing evaluated (T8639.bit)
+:t T8639.it
+   -- Gets 'it' from T8639
+
+:m -T8639
+import T8639 as Q
+
+:t bit
+:t Q.bit
+:t H.bit
+   -- Should say "out of scope"
+:t it
+   -- Gets the last thing evaluated (T8639.bit)
+:t Q.it
+   -- Gets 'it' from T8639
diff --git a/tests/ghci/scripts/T8639.stderr b/tests/ghci/scripts/T8639.stderr
new file mode 100644
index 0000000..ca52a89
--- /dev/null
+++ b/tests/ghci/scripts/T8639.stderr
@@ -0,0 +1,4 @@
+
+<interactive>:1:1:
+    Not in scope: ‛H.bit’
+    Perhaps you meant ‛Q.bit’ (imported from T8639)
diff --git a/tests/ghci/scripts/all.T b/tests/ghci/scripts/all.T
index 966ea90..c1c50cd 100755
--- a/tests/ghci/scripts/all.T
+++ b/tests/ghci/scripts/all.T
@@ -160,3 +160,4 @@ test('T8383', normal, ghci_script, ['T8383.script'])
 test('T8469', normal, ghci_script, ['T8469.script'])
 test('T8485', normal, ghci_script, ['T8485.script'])
 test('T8535', normal, ghci_script, ['T8535.script'])
+test('T8639', normal, ghci_script, ['T8639.script'])



More information about the ghc-commits mailing list