• Roland Senn's avatar
    In `:break ident` allow out of scope and nested identifiers (Fix #3000) · 7e6d3d09
    Roland Senn authored
    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`.
    7e6d3d09
Code owners : Ben Gamari
ghci.rst 124 KB