From 1550a82419d4608e4337ba8f2ce02730f9b73ff3 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Tue, 8 Mar 2022 18:49:40 +0530 Subject: testsuite: Add testcase for #16415 --- testsuite/tests/ghci/scripts/T16415.script | 2 ++ testsuite/tests/ghci/scripts/T16415.stdout | 8 ++++++++ testsuite/tests/ghci/scripts/all.T | 1 + 3 files changed, 11 insertions(+) create mode 100644 testsuite/tests/ghci/scripts/T16415.script create mode 100644 testsuite/tests/ghci/scripts/T16415.stdout diff --git a/testsuite/tests/ghci/scripts/T16415.script b/testsuite/tests/ghci/scripts/T16415.script new file mode 100644 index 0000000000..c1e9b2fd58 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T16415.script @@ -0,0 +1,2 @@ +:doc id +:doc Control.Monad.State.State diff --git a/testsuite/tests/ghci/scripts/T16415.stdout b/testsuite/tests/ghci/scripts/T16415.stdout new file mode 100644 index 0000000000..4dd8c51449 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T16415.stdout @@ -0,0 +1,8 @@ + Identity function. + + > id x = x + A state monad parameterized by the type @s@ of the state to carry. + + The 'return' function leaves the state unchanged, while @>>=@ uses + the final state of the first computation as the initial state of + the second. diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 0f6ed54ddb..f919411125 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -364,3 +364,4 @@ test('T20909', normal, ghci_script, ['T20909.script']) test('T20150', normal, ghci_script, ['T20150.script']) test('T20974', normal, ghci_script, ['T20974.script']) test('T21088', normal, ghci_script, ['T21088.script']) +test('T16415', [req_haddock], ghci_script, ['T16415.script']) -- cgit v1.2.1