From 8f1b16205a410c2a2421303b2d951824a9f8c489 Mon Sep 17 00:00:00 2001 From: sewardj Date: Wed, 2 May 2001 16:15:09 +0000 Subject: [PATCH] [project @ 2001-05-02 16:15:09 by sewardj] Add test to check contexts on existential types in the interpreter. --- ghc/tests/ghci/ghci006.hs | 6 ++++++ ghc/tests/ghci/ghci006.script | 6 ++++++ ghc/tests/ghci/ghci006.stdout | 1 + 3 files changed, 13 insertions(+) create mode 100644 ghc/tests/ghci/ghci006.hs create mode 100644 ghc/tests/ghci/ghci006.script create mode 100644 ghc/tests/ghci/ghci006.stdout diff --git a/ghc/tests/ghci/ghci006.hs b/ghc/tests/ghci/ghci006.hs new file mode 100644 index 0000000..a09377c --- /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 0000000..5b90605 --- /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 0000000..c0f6098 --- /dev/null +++ b/ghc/tests/ghci/ghci006.stdout @@ -0,0 +1 @@ +\"foo\" -- 1.7.10.4