diff --git a/TODO.md b/TODO.md index 47284b0..b9e5b54 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,4 @@ -rename lang0 to lang +# docs -# lang0 - -[lang0] docs/lambda-encoding -- Exp Lambda 编码的例子,外加解释器 -[lang0] docs/self-type +[docs] docs/lambda-encoding -- Exp Lambda 编码的例子,外加解释器 +[docs] docs/self-type diff --git a/src/command-line/commands/RunCommand.ts b/src/command-line/commands/RunCommand.ts index b534f08..6549230 100644 --- a/src/command-line/commands/RunCommand.ts +++ b/src/command-line/commands/RunCommand.ts @@ -2,7 +2,7 @@ import { Command, CommandRunner } from "@xieyuheng/command-line" import { ty } from "@xieyuheng/ty" import fs from "fs" import Path from "path" -import { run } from "../../lang0/run/index.js" +import { run } from "../../lang/run/index.js" type Args = { file: string } type Opts = {} diff --git a/src/lang0/actions/doAp.ts b/src/lang/actions/doAp.ts similarity index 100% rename from src/lang0/actions/doAp.ts rename to src/lang/actions/doAp.ts diff --git a/src/lang0/actions/index.ts b/src/lang/actions/index.ts similarity index 100% rename from src/lang0/actions/index.ts rename to src/lang/actions/index.ts diff --git a/src/lang0/definition/Definition.ts b/src/lang/definition/Definition.ts similarity index 100% rename from src/lang0/definition/Definition.ts rename to src/lang/definition/Definition.ts diff --git a/src/lang0/definition/index.ts b/src/lang/definition/index.ts similarity index 100% rename from src/lang0/definition/index.ts rename to src/lang/definition/index.ts diff --git a/src/lang0/env/Env.ts b/src/lang/env/Env.ts similarity index 100% rename from src/lang0/env/Env.ts rename to src/lang/env/Env.ts diff --git a/src/lang0/env/index.ts b/src/lang/env/index.ts similarity index 100% rename from src/lang0/env/index.ts rename to src/lang/env/index.ts diff --git a/src/lang0/equivalent/EquivalentCtx.ts b/src/lang/equivalent/EquivalentCtx.ts similarity index 100% rename from src/lang0/equivalent/EquivalentCtx.ts rename to src/lang/equivalent/EquivalentCtx.ts diff --git a/src/lang0/equivalent/equivalent.ts b/src/lang/equivalent/equivalent.ts similarity index 100% rename from src/lang0/equivalent/equivalent.ts rename to src/lang/equivalent/equivalent.ts diff --git a/src/lang0/equivalent/equivalentNeutral.ts b/src/lang/equivalent/equivalentNeutral.ts similarity index 100% rename from src/lang0/equivalent/equivalentNeutral.ts rename to src/lang/equivalent/equivalentNeutral.ts diff --git a/src/lang0/equivalent/index.ts b/src/lang/equivalent/index.ts similarity index 100% rename from src/lang0/equivalent/index.ts rename to src/lang/equivalent/index.ts diff --git a/src/lang0/evaluate/evaluate.ts b/src/lang/evaluate/evaluate.ts similarity index 100% rename from src/lang0/evaluate/evaluate.ts rename to src/lang/evaluate/evaluate.ts diff --git a/src/lang0/evaluate/evaluateDefinition.ts b/src/lang/evaluate/evaluateDefinition.ts similarity index 100% rename from src/lang0/evaluate/evaluateDefinition.ts rename to src/lang/evaluate/evaluateDefinition.ts diff --git a/src/lang0/evaluate/index.ts b/src/lang/evaluate/index.ts similarity index 100% rename from src/lang0/evaluate/index.ts rename to src/lang/evaluate/index.ts diff --git a/src/lang0/exp/Exp.ts b/src/lang/exp/Exp.ts similarity index 100% rename from src/lang0/exp/Exp.ts rename to src/lang/exp/Exp.ts diff --git a/src/lang0/exp/expFreeNames.ts b/src/lang/exp/expFreeNames.ts similarity index 100% rename from src/lang0/exp/expFreeNames.ts rename to src/lang/exp/expFreeNames.ts diff --git a/src/lang0/exp/expIndirectFreeNames.ts b/src/lang/exp/expIndirectFreeNames.ts similarity index 100% rename from src/lang0/exp/expIndirectFreeNames.ts rename to src/lang/exp/expIndirectFreeNames.ts diff --git a/src/lang0/exp/index.ts b/src/lang/exp/index.ts similarity index 100% rename from src/lang0/exp/index.ts rename to src/lang/exp/index.ts diff --git a/src/lang0/format/formatExp.ts b/src/lang/format/formatExp.ts similarity index 95% rename from src/lang0/format/formatExp.ts rename to src/lang/format/formatExp.ts index ce593a8..4c3f211 100644 --- a/src/lang0/format/formatExp.ts +++ b/src/lang/format/formatExp.ts @@ -1,4 +1,4 @@ -import type { Binding } from "../../lang0/substitution/index.js" +import type { Binding } from "../../lang/substitution/index.js" import { type Exp } from "../exp/index.js" import { substitutionBindings } from "../substitution/Substitution.js" diff --git a/src/lang0/format/index.ts b/src/lang/format/index.ts similarity index 100% rename from src/lang0/format/index.ts rename to src/lang/format/index.ts diff --git a/src/lang0/mod/Mod.ts b/src/lang/mod/Mod.ts similarity index 100% rename from src/lang0/mod/Mod.ts rename to src/lang/mod/Mod.ts diff --git a/src/lang0/mod/createMod.ts b/src/lang/mod/createMod.ts similarity index 100% rename from src/lang0/mod/createMod.ts rename to src/lang/mod/createMod.ts diff --git a/src/lang0/mod/index.ts b/src/lang/mod/index.ts similarity index 100% rename from src/lang0/mod/index.ts rename to src/lang/mod/index.ts diff --git a/src/lang0/mod/modDefine.ts b/src/lang/mod/modDefine.ts similarity index 100% rename from src/lang0/mod/modDefine.ts rename to src/lang/mod/modDefine.ts diff --git a/src/lang0/mod/modFind.ts b/src/lang/mod/modFind.ts similarity index 100% rename from src/lang0/mod/modFind.ts rename to src/lang/mod/modFind.ts diff --git a/src/lang0/mod/modFindValue.ts b/src/lang/mod/modFindValue.ts similarity index 100% rename from src/lang0/mod/modFindValue.ts rename to src/lang/mod/modFindValue.ts diff --git a/src/lang0/mod/modOwnDefinitions.ts b/src/lang/mod/modOwnDefinitions.ts similarity index 100% rename from src/lang0/mod/modOwnDefinitions.ts rename to src/lang/mod/modOwnDefinitions.ts diff --git a/src/lang0/mod/modResolve.ts b/src/lang/mod/modResolve.ts similarity index 100% rename from src/lang0/mod/modResolve.ts rename to src/lang/mod/modResolve.ts diff --git a/src/lang0/neutral/Neutral.ts b/src/lang/neutral/Neutral.ts similarity index 100% rename from src/lang0/neutral/Neutral.ts rename to src/lang/neutral/Neutral.ts diff --git a/src/lang0/neutral/index.ts b/src/lang/neutral/index.ts similarity index 100% rename from src/lang0/neutral/index.ts rename to src/lang/neutral/index.ts diff --git a/src/lang0/readback/ReadbackCtx.ts b/src/lang/readback/ReadbackCtx.ts similarity index 100% rename from src/lang0/readback/ReadbackCtx.ts rename to src/lang/readback/ReadbackCtx.ts diff --git a/src/lang0/readback/index.ts b/src/lang/readback/index.ts similarity index 100% rename from src/lang0/readback/index.ts rename to src/lang/readback/index.ts diff --git a/src/lang0/readback/readback.ts b/src/lang/readback/readback.ts similarity index 100% rename from src/lang0/readback/readback.ts rename to src/lang/readback/readback.ts diff --git a/src/lang0/readback/readbackNeutral.ts b/src/lang/readback/readbackNeutral.ts similarity index 100% rename from src/lang0/readback/readbackNeutral.ts rename to src/lang/readback/readbackNeutral.ts diff --git a/src/lang0/run/assertAllNamesDefined.ts b/src/lang/run/assertAllNamesDefined.ts similarity index 100% rename from src/lang0/run/assertAllNamesDefined.ts rename to src/lang/run/assertAllNamesDefined.ts diff --git a/src/lang0/run/assertEqual.ts b/src/lang/run/assertEqual.ts similarity index 100% rename from src/lang0/run/assertEqual.ts rename to src/lang/run/assertEqual.ts diff --git a/src/lang0/run/assertNotEqual.ts b/src/lang/run/assertNotEqual.ts similarity index 100% rename from src/lang0/run/assertNotEqual.ts rename to src/lang/run/assertNotEqual.ts diff --git a/src/lang0/run/define.ts b/src/lang/run/define.ts similarity index 100% rename from src/lang0/run/define.ts rename to src/lang/run/define.ts diff --git a/src/lang0/run/execute.ts b/src/lang/run/execute.ts similarity index 100% rename from src/lang0/run/execute.ts rename to src/lang/run/execute.ts diff --git a/src/lang0/run/importOne.ts b/src/lang/run/importOne.ts similarity index 100% rename from src/lang0/run/importOne.ts rename to src/lang/run/importOne.ts diff --git a/src/lang0/run/index.ts b/src/lang/run/index.ts similarity index 100% rename from src/lang0/run/index.ts rename to src/lang/run/index.ts diff --git a/src/lang0/run/load.ts b/src/lang/run/load.ts similarity index 100% rename from src/lang0/run/load.ts rename to src/lang/run/load.ts diff --git a/src/lang0/run/occurCheck.ts b/src/lang/run/occurCheck.ts similarity index 100% rename from src/lang0/run/occurCheck.ts rename to src/lang/run/occurCheck.ts diff --git a/src/lang0/run/run.ts b/src/lang/run/run.ts similarity index 100% rename from src/lang0/run/run.ts rename to src/lang/run/run.ts diff --git a/src/lang0/run/runMod.ts b/src/lang/run/runMod.ts similarity index 100% rename from src/lang0/run/runMod.ts rename to src/lang/run/runMod.ts diff --git a/src/lang0/stmt/Stmt.ts b/src/lang/stmt/Stmt.ts similarity index 100% rename from src/lang0/stmt/Stmt.ts rename to src/lang/stmt/Stmt.ts diff --git a/src/lang0/stmt/index.ts b/src/lang/stmt/index.ts similarity index 100% rename from src/lang0/stmt/index.ts rename to src/lang/stmt/index.ts diff --git a/src/lang0/substitution/Substitution.ts b/src/lang/substitution/Substitution.ts similarity index 100% rename from src/lang0/substitution/Substitution.ts rename to src/lang/substitution/Substitution.ts diff --git a/src/lang0/substitution/index.ts b/src/lang/substitution/index.ts similarity index 100% rename from src/lang0/substitution/index.ts rename to src/lang/substitution/index.ts diff --git a/src/lang0/syntax/Parser.ts b/src/lang/syntax/Parser.ts similarity index 100% rename from src/lang0/syntax/Parser.ts rename to src/lang/syntax/Parser.ts diff --git a/src/lang0/syntax/index.ts b/src/lang/syntax/index.ts similarity index 100% rename from src/lang0/syntax/index.ts rename to src/lang/syntax/index.ts diff --git a/src/lang0/syntax/matchExp.ts b/src/lang/syntax/matchExp.ts similarity index 100% rename from src/lang0/syntax/matchExp.ts rename to src/lang/syntax/matchExp.ts diff --git a/src/lang0/syntax/matchStmt.ts b/src/lang/syntax/matchStmt.ts similarity index 100% rename from src/lang0/syntax/matchStmt.ts rename to src/lang/syntax/matchStmt.ts diff --git a/src/lang0/utils/freshen.test.ts b/src/lang/utils/freshen.test.ts similarity index 100% rename from src/lang0/utils/freshen.test.ts rename to src/lang/utils/freshen.test.ts diff --git a/src/lang0/utils/freshen.ts b/src/lang/utils/freshen.ts similarity index 100% rename from src/lang0/utils/freshen.ts rename to src/lang/utils/freshen.ts diff --git a/src/lang0/value/Value.ts b/src/lang/value/Value.ts similarity index 100% rename from src/lang0/value/Value.ts rename to src/lang/value/Value.ts diff --git a/src/lang0/value/index.ts b/src/lang/value/index.ts similarity index 100% rename from src/lang0/value/index.ts rename to src/lang/value/index.ts diff --git a/src/lang0/value/lazyActive.ts b/src/lang/value/lazyActive.ts similarity index 100% rename from src/lang0/value/lazyActive.ts rename to src/lang/value/lazyActive.ts