diff options
author | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-10-08 09:23:18 +0000 |
---|---|---|
committer | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-10-08 09:23:18 +0000 |
commit | 0b6b9fb5bcf0463e19a69a1f630aabbc62887e7d (patch) | |
tree | a97345b98da646cb1b373ae016c0acea3b1bffb8 /testsuite/tests/ghc-regress/ghci | |
parent | adb2c741c8b7b40d765b17aa6367660a64a74d42 (diff) | |
download | haskell-0b6b9fb5bcf0463e19a69a1f630aabbc62887e7d.tar.gz |
add a test for multiline do, GHCi #4316
This patch ensures the GHCi interpreter recognises multiline do
commands.
Diffstat (limited to 'testsuite/tests/ghc-regress/ghci')
-rw-r--r-- | testsuite/tests/ghc-regress/ghci/scripts/T4316.script | 7 | ||||
-rw-r--r-- | testsuite/tests/ghc-regress/ghci/scripts/T4316.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/ghc-regress/ghci/scripts/all.T | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/ghci/scripts/T4316.script b/testsuite/tests/ghc-regress/ghci/scripts/T4316.script new file mode 100644 index 0000000000..7b19517fe6 --- /dev/null +++ b/testsuite/tests/ghc-regress/ghci/scripts/T4316.script @@ -0,0 +1,7 @@ +:m Control.Monad.State +flip evalStateT 11 $ do + i <- get + lift $ do + putStrLn "Hello, World!" + print i + diff --git a/testsuite/tests/ghc-regress/ghci/scripts/T4316.stdout b/testsuite/tests/ghc-regress/ghci/scripts/T4316.stdout new file mode 100644 index 0000000000..4aa464180e --- /dev/null +++ b/testsuite/tests/ghc-regress/ghci/scripts/T4316.stdout @@ -0,0 +1,2 @@ +Hello, World! +11 diff --git a/testsuite/tests/ghc-regress/ghci/scripts/all.T b/testsuite/tests/ghc-regress/ghci/scripts/all.T index ac85506999..b1e53411a4 100644 --- a/testsuite/tests/ghc-regress/ghci/scripts/all.T +++ b/testsuite/tests/ghc-regress/ghci/scripts/all.T @@ -71,3 +71,4 @@ test('T4087', normal, ghci_script, ['T4087.script']) test('T4015', normal, ghci_script, ['T4015.script']) test('T4127', normal, ghci_script, ['T4127.script']) test('T4127a', normal, ghci_script, ['T4127a.script']) +test('T4316', reqlib('mtl'), ghci_script, ['T4316.script']) |