[project @ 2001-05-02 16:15:09 by sewardj]
authorsewardj <unknown>
Wed, 2 May 2001 16:15:09 +0000 (16:15 +0000)
committersewardj <unknown>
Wed, 2 May 2001 16:15:09 +0000 (16:15 +0000)
Add test to check contexts on existential types in the interpreter.

ghc/tests/ghci/ghci006.hs [new file with mode: 0644]
ghc/tests/ghci/ghci006.script [new file with mode: 0644]
ghc/tests/ghci/ghci006.stdout [new file with mode: 0644]

diff --git a/ghc/tests/ghci/ghci006.hs b/ghc/tests/ghci/ghci006.hs
new file mode 100644 (file)
index 0000000..a09377c
--- /dev/null
@@ -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 (file)
index 0000000..5b90605
--- /dev/null
@@ -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 (file)
index 0000000..c0f6098
--- /dev/null
@@ -0,0 +1 @@
+\"foo\"