diff options
| author | Roland Senn <rsx@bluewin.ch> | 2020-05-06 18:18:40 +0200 |
|---|---|---|
| committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-25 03:54:38 -0400 |
| commit | 7e6d3d09d983337df30d12e5aaa96bae9b81b324 (patch) | |
| tree | e376ca40ae31e8e0cbb11c501f3aae2d2c5a52eb /testsuite/tests/ghci.debugger/scripts/T3000.script | |
| parent | 03a708ba8e8c323b07d8d2e0115d6eb59987cc02 (diff) | |
| download | haskell-7e6d3d09d983337df30d12e5aaa96bae9b81b324.tar.gz | |
In `:break ident` allow out of scope and nested identifiers (Fix #3000)
This patch fixes the bug and implements the feature request of #3000.
1. If `Module` is a real module name and `identifier` a name of a
top-level function in `Module` then `:break Module.identifer` works
also for an `identifier` that is out of scope.
2. Extend the syntax for `:break identifier` to:
:break [ModQual.]topLevelIdent[.nestedIdent]...[.nestedIdent]
`ModQual` is optional and is either the effective name of a module or
the local alias of a qualified import statement.
`topLevelIdent` is the name of a top level function in the module
referenced by `ModQual`.
`nestedIdent` is optional and the name of a function nested in a let or
where clause inside the previously mentioned function `nestedIdent` or
`topLevelIdent`.
If `ModQual` is a module name, then `topLevelIdent` can be any top level
identifier in this module. If `ModQual` is missing or a local alias of a
qualified import, then `topLevelIdent` must be in scope.
Breakpoints can be set on arbitrarily deeply nested functions, but the
whole chain of nested function names must be specified.
3. To support the new functionality rewrite the code to tab complete `:break`.
Diffstat (limited to 'testsuite/tests/ghci.debugger/scripts/T3000.script')
| -rw-r--r-- | testsuite/tests/ghci.debugger/scripts/T3000.script | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/T3000.script b/testsuite/tests/ghci.debugger/scripts/T3000.script new file mode 100644 index 0000000000..4cee82d4a0 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/T3000.script @@ -0,0 +1,16 @@ +:l T3000 +:break main +:break Main.main +:break T3000S.sshow +:break S.sshow +:break T3000S.hidden +:break T3000S.sshow.nest +:show breaks +-- Generate some error messages +:break xyz +:break sshow +:break S.hidden +:break S.hidden.nest +:break Foo.xyz +:break T3000S +:break T3000S.xyz |
