Skip to content

In `:break ident` support out of scope and nested identifiers (Fix #3000)

Roland Senn requested to merge RolandSenn/ghc:T3000 into master

This patch fixes the bug and implements the feature request of #3000 (closed).

  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.

To support the new functionality the code to tab complete :break was rewritten.

Edited by Roland Senn

Merge request reports