Imports.dedupe.kept: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/layout/imports.bend as Imports Lines 150-163 of bend-lint-rules@0.2.0.0/layout/imports.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/layout/imports.bend&start_line=150&end_line=163 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint import bend-lint-api@0.2.0.0/shared/names.bend as Names # An import read, after those before it: kept, if its file has no import yet; else dropped, with its uses pointed at # `first`, the alias of the file's first import. A second import Base has none to point: its uses are bare names. def dedupe.kept(first: Maybe<&2, String>, e: Entry, d: Deduped) -> Deduped: match first e d: case None{} Entry{at, base, path, +alias, +loads, text} Deduped{seen, kept, renames}: Deduped{ Names.Named{loads, alias} <> seen, Entry{at, base, path, alias, loads, text} <> kept, renames } case Some{a} Entry{at, False{}, path, alias, loads, text} Deduped{seen, kept, renames}: Deduped{seen, kept, Lint.RenameUses{at, a} <> renames} case Some{a} Entry{at, True{}, path, alias, loads, text} _: d Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Operation https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/shared/names.bend&name=Named https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/imports.bend&name=Deduped https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/imports.bend&name=Entry