Skip to content

Commit

Permalink
[lang1] rename substitutionKeepNames to substitutionTakeNames
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed May 17, 2024
1 parent 9408594 commit ac2ac7c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lang0/substitution/Substitution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function substitutionMapExp(
])
}

export function substitutionKeepNames(
export function substitutionTakeNames(
substitution: Substitution,
names: Set<string>,
): Substitution {
Expand Down
4 changes: 2 additions & 2 deletions src/lang1/reduce/substitute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type Exp } from "../exp/index.js"
import {
substitutionExtend,
substitutionIsEmpty,
substitutionKeepNames,
substitutionTakeNames,
substitutionMapExp,
substitutionMerge,
type Substitution,
Expand All @@ -14,7 +14,7 @@ import { lookup } from "./lookup.js"
// NOTE `substitute` should not call `reduce.

export function substitute(substitution: Substitution, body: Exp): Exp {
substitution = substitutionKeepNames(
substitution = substitutionTakeNames(
substitution,
Exps.expFreeNames(new Set(), body),
)
Expand Down
2 changes: 1 addition & 1 deletion src/lang1/substitution/Substitution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function substitutionMapExp(
])
}

export function substitutionKeepNames(
export function substitutionTakeNames(
substitution: Substitution,
names: Set<string>,
): Substitution {
Expand Down

0 comments on commit ac2ac7c

Please sign in to comment.