diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/ghci/scripts/T8113.script | 18 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T8113.stdout | 21 | ||||
-rwxr-xr-x | testsuite/tests/ghci/scripts/all.T | 1 |
3 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T8113.script b/testsuite/tests/ghci/scripts/T8113.script new file mode 100644 index 0000000000..9392c23c41 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T8113.script @@ -0,0 +1,18 @@ +:def type (\e -> putStrLn ("called :type for "++show e++" (ignoring)") >> return "") +:def +:t () +:ty True +:typ () +:type False +:def! type (\e -> putStrLn ("called :type for "++show e++" (chaining)") >> return ("::type "++e)) +:def +:t () +:ty True +:typ () +:type False +:undef type +:def +:t () +:ty True +:typ () +:type False diff --git a/testsuite/tests/ghci/scripts/T8113.stdout b/testsuite/tests/ghci/scripts/T8113.stdout new file mode 100644 index 0000000000..8260a35d04 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T8113.stdout @@ -0,0 +1,21 @@ +the following macros are defined: +type +called :type for "()" (ignoring) +called :type for "True" (ignoring) +called :type for "()" (ignoring) +called :type for "False" (ignoring) +the following macros are defined: +type +called :type for "()" (chaining) +() :: () +called :type for "True" (chaining) +True :: Bool +called :type for "()" (chaining) +() :: () +called :type for "False" (chaining) +False :: Bool +no macros defined +() :: () +True :: Bool +() :: () +False :: Bool diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index fe4d0fbfc4..1577a63274 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -152,3 +152,4 @@ test('T7873', normal, ghci_script, ['T7873.script']) test('T7939', normal, ghci_script, ['T7939.script']) test('T7894', normal, ghci_script, ['T7894.script']) test('T8116', normal, ghci_script, ['T8116.script']) +test('T8113', normal, ghci_script, ['T8113.script']) |