unison-cli-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Codebase.Editor.HandleInput.DeleteNamespace

Synopsis

Documentation

getEndangeredDependents Source #

Arguments

:: 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 lib

-> 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.