Skip to content

Commit 0668e4a

Browse files
committed
redefinition
1 parent 5a0e7ed commit 0668e4a

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

LM23COMMON/typecheck-acontext-substitute.lsts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ let substitute(ctx: List<(CString,AST)>, tt: List<Type>): List<Type> = (
4444

4545
let substitute(ctx: List<(CString,AST)>, term: AST): AST = (
4646
match term {
47-
App{left:Var{key:c"uuid"}, right:Var{x=key}} => ctx.lookup(x,term).unique;
48-
Var{x=key} => ctx.lookup(x,term).unique;
47+
App{left:Var{key:c"uuid"}, right:Var{x1=key}} => ctx.lookup(x1,term).unique;
48+
Var{x2=key} => ctx.lookup(x2,term).unique;
4949
Lit{} => term.unique;
5050
Seq{seq=seq} => (
5151
let ret = mk-vector(type(AST), seq.length);

LM23COMMON/typecheck-std-direct-destructure-macro.lsts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
let std-direct-destructure-macro(margs: AST, mstruct: AST): AContext? = (
33
let no = (None : AContext?)();
44
match (margs, mstruct) {
5-
Tuple{ val=first, second:Var{key=key} } => Some([(key,val)]);
6-
Tuple{ first:App{lrest=left, val=right}, second:App{rrest=left, right:Var{key=key}} } => (
5+
Tuple{ val=first, second:Var{key1=key} } => Some([(key1,val)]);
6+
Tuple{ first:App{lrest=left, val=right}, second:App{rrest=left, right:Var{key2=key}} } => (
77
let ctx = std-direct-destructure-macro(lrest, rrest);
8-
if ctx.is-some then Some(cons((key,val), ctx.get-or-panic)) else no;
8+
if ctx.is-some then Some(cons((key2,val), ctx.get-or-panic)) else no;
99
);
1010
_ => fail("Unexpected std-direct-destructure-macro\nLeft: \{mstruct}\nRight: \{margs}\n");
1111
}

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ CC = clang
22
CFLAGS = -w -O2 -march=native -mtune=native
33

44
dev: install-production
5-
#lm --showalloc tests/promises/lm-typecheck/compilation-counting-diff1.lsts
6-
lm --showalloc tests/promises/lm-typecheck/compilation-counting-diff2.lsts > out.txt
5+
lm tests/promises/list/comparison.lsts
6+
gcc tmp.c
7+
./a.out
78

89
build: compile-production
910
time ./production --v2 --c -o deploy1.c SRC/index.lsts

tests/promises/lm-typecheck/direct-inference.lsts.skip

Whitespace-only changes.

0 commit comments

Comments
 (0)