Skip to content

Commit 9a664a7

Browse files
committed
up
1 parent f680dec commit 9a664a7

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/lang/same/sameInCtx.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,20 @@ export function sameInCtx(ctx: Ctx, lhs: Value, rhs: Value): boolean {
2222
if (lambdaSameDefined(lhs, rhs)) {
2323
return true
2424
}
25-
}
2625

27-
if (lhs.kind === "Lambda" && !lambdaIsDefined(lhs)) {
28-
if (rhs.kind === "Lambda" && lambdaIsDefined(rhs)) {
26+
if (lambdaIsDefined(lhs) || lambdaIsDefined(rhs)) {
2927
return false
3028
}
29+
}
3130

31+
if (lhs.kind === "Lambda" && !lambdaIsDefined(lhs)) {
3232
const freshName = freshen(ctx.boundNames, lhs.name)
3333
ctx = ctxBindName(ctx, freshName)
3434
const arg = Values.NotYet(Neutrals.Var(freshName))
3535
return sameInCtx(ctx, applyWithDelay(lhs, arg), applyWithDelay(rhs, arg))
3636
}
3737

3838
if (rhs.kind === "Lambda" && !lambdaIsDefined(rhs)) {
39-
if (lhs.kind === "Lambda" && lambdaIsDefined(lhs)) {
40-
return false
41-
}
42-
4339
const freshName = freshen(ctx.boundNames, rhs.name)
4440
ctx = ctxBindName(ctx, freshName)
4541
const arg = Values.NotYet(Neutrals.Var(freshName))

0 commit comments

Comments
 (0)