Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- handleDeleteNamespace :: Input -> Insistence -> Maybe (Path, NameSegment) -> Cli ()
- getEndangeredDependents :: Names -> Set LabeledDependency -> Names -> Names -> Transaction (Map LabeledDependency (NESet LabeledDependency))
Documentation
handleDeleteNamespace :: Input -> Insistence -> Maybe (Path, NameSegment) -> Cli () Source #
getEndangeredDependents Source #
:: Names | Prospective target for deletion |
-> Set LabeledDependency | All entities we want to delete (including the target) |
-> Names | Names from the current branch |
-> Names | Names from the current branch, sans |
-> Transaction (Map LabeledDependency (NESet LabeledDependency)) | map from references going extinct to the set of endangered dependents |
Goal: When deleting, we might be removing the last name of a given definition (i.e. the
definition is going "extinct"). In this case we may wish to take some action or warn the
user about these "endangered" definitions which would now contain unnamed references.
The argument otherDesiredDeletions
is included in this function because the user might want to
delete a term and all its dependencies in one command, so we give this function access to
the full set of entities that the user wishes to delete.