diff options
author | Roland Senn <rsx@bluewin.ch> | 2020-04-02 14:58:12 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-22 23:11:51 -0400 |
commit | 48b8951e819e5d7d06ad7e168323de320d87bbd6 (patch) | |
tree | 872280292ebe4e25eb9dfb9325d01b747111cbdc /testsuite/tests/ghci.debugger/scripts/all.T | |
parent | 6c9fae2342f19ab3e6ac688825a3817b23bf1fcc (diff) | |
download | haskell-48b8951e819e5d7d06ad7e168323de320d87bbd6.tar.gz |
Fix tab-completion for :break (#17989)
In tab-completion for the `:break` command, only those
identifiers should be shown, that are accepted in the
`:break` command. Hence these identifiers must be
- defined in an interpreted module
- top-level
- currently in scope
- listed in a `ModBreaks` value as a possible breakpoint.
The identifiers my be qualified or unqualified.
To get all possible top-level breakpoints for tab-completeion
with the correct qualification do:
1. Build the list called `pifsBreaks` of all pairs of
(Identifier, module-filename) from the `ModBreaks` values.
Here all identifiers are unqualified.
2. Build the list called `pifInscope` of all pairs of
(Identifiers, module-filename) with identifiers from
the `GlobalRdrEnv`. Take only those identifiers that are
in scope and have the correct prefix.
Here the identifiers may be qualified.
3. From the `pifInscope` list seclect all pairs that can be
found in the `pifsBreaks` list, by comparing only the
unqualified part of the identifier.
The remaining identifiers can be used for tab-completion.
This ensures, that we show only identifiers, that can be used
in a `:break` command.
Diffstat (limited to 'testsuite/tests/ghci.debugger/scripts/all.T')
-rw-r--r-- | testsuite/tests/ghci.debugger/scripts/all.T | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T index db597a455f..12fe420363 100644 --- a/testsuite/tests/ghci.debugger/scripts/all.T +++ b/testsuite/tests/ghci.debugger/scripts/all.T @@ -125,3 +125,4 @@ test('T16700', normal, ghci_script, ['T16700.script']) test('break029', extra_files(['break029.hs']), ghci_script, ['break029.script']) test('T2215', normal, ghci_script, ['T2215.script']) +test('T17989', normal, ghci_script, ['T17989.script']) |