summaryrefslogtreecommitdiff
path: root/ghc/tests
diff options
context:
space:
mode:
authorsewardj <unknown>2001-05-02 16:15:09 +0000
committersewardj <unknown>2001-05-02 16:15:09 +0000
commit8f1b16205a410c2a2421303b2d951824a9f8c489 (patch)
treee8974f61e5626a8fc2be28ff46cfe4576ae3b705 /ghc/tests
parentfe1e9caf43f703d4c62bbf037d36502f8713efc9 (diff)
downloadhaskell-8f1b16205a410c2a2421303b2d951824a9f8c489.tar.gz
[project @ 2001-05-02 16:15:09 by sewardj]
Add test to check contexts on existential types in the interpreter.
Diffstat (limited to 'ghc/tests')
-rw-r--r--ghc/tests/ghci/ghci006.hs6
-rw-r--r--ghc/tests/ghci/ghci006.script6
-rw-r--r--ghc/tests/ghci/ghci006.stdout1
3 files changed, 13 insertions, 0 deletions
diff --git a/ghc/tests/ghci/ghci006.hs b/ghc/tests/ghci/ghci006.hs
new file mode 100644
index 0000000000..a09377cce2
--- /dev/null
+++ b/ghc/tests/ghci/ghci006.hs
@@ -0,0 +1,6 @@
+
+data Q = forall x . Show x => Q x
+showQ (Q x) = show x
+
+-- associated bug is that at the interpreter command line,
+-- showQ (Q "foo") crashed the interpreter. \ No newline at end of file
diff --git a/ghc/tests/ghci/ghci006.script b/ghc/tests/ghci/ghci006.script
new file mode 100644
index 0000000000..5b90605e35
--- /dev/null
+++ b/ghc/tests/ghci/ghci006.script
@@ -0,0 +1,6 @@
+:unset +s +t
+:s -fglasgow-exts
+-- test for contexts on existential types crashing the interpreter
+:l ghci006
+showQ (Q "foo")
+
diff --git a/ghc/tests/ghci/ghci006.stdout b/ghc/tests/ghci/ghci006.stdout
new file mode 100644
index 0000000000..c0f609860a
--- /dev/null
+++ b/ghc/tests/ghci/ghci006.stdout
@@ -0,0 +1 @@
+\"foo\"