Skip to content

Commit 4cae887

Browse files
no specialization working
1 parent 3f52220 commit 4cae887

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

PLUGINS/BACKEND/C/std-c-compile-call.lsts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
let std-c-compile-call(ctx: FContext, fname: CString, fterm: AST, args: AST): Fragment = (
3+
fterm = find-global-callable(fname, typeof(args));
34
if not(non-zero(fterm)) then fail("std-c-compile-call Function was null: \{fterm}\nArguments: \{typeof(args)}\n");
45
if typeof(fterm).is-t(c"Blob") {
56
let r = mk-fragment();

SRC/ascript-normal.lsts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ let ascript-normal(t: AST, tt: Type): Nil = (
99
exit-error("Type Ascription Inequality\n\{normalize(typeof(t))} does not imply \{normalize(tt)}", t);
1010
}
1111
}
12-
} else {
13-
add-concrete-type-instance(tt);
14-
tt = denormalize(tt);
15-
ascript(t, tt);
16-
types-have-changed = true;
17-
}
12+
} else ascript-force(t, tt);
1813
}
1914
);
15+
16+
let ascript-force(t: AST, tt: Type): Nil = (
17+
add-concrete-type-instance(tt);
18+
tt = denormalize(tt);
19+
ascript(t, tt);
20+
types-have-changed = true;
21+
);

SRC/preprocess-apply-hard.lm

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,6 @@ preprocess-apply-hard := λ(: macro-name String)(: arity U64)(: program AST). (:
3939
( _ (set macros MEOF) )
4040
)))
4141
(if (not matched) (
42-
(let macro-list preprocess-macros)
43-
(while (non-zero macro-list) (match macro-list (
44-
()
45-
( (MSeq( rst (Macro( ml mr )) )) (
46-
(print 'Macro\s_s)(print ml)(print '\s=>\s_s)(print mr)(print '\n_s)
47-
(set macro-list rst)
48-
))
49-
)))
50-
(print 'Args\s_s)(print program)(print '\n_s)
5142
(exit-error( (+( 'Invalid\sMacro\sApplication\s_s macro-name )) program ))
5243
) ())
5344
return

SRC/std-infer-expr.lsts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ let std-infer-expr(tctx: Maybe<TContext>, term: AST, is-scoped: Bool, used: IsUs
179179

180180
if not(is-macro) && not(is-cons) && non-zero(var-name-if-var(l)) && typeof(l).is-arrow {
181181
mark-var-to-def-todo(tctx, var-name-if-var(l), typeof(r), l);
182+
ascript-force( l, typeof(find-global-callable(var-name-if-var(l),typeof(r))) );
182183
};
183184
);
184185
_ => fail("Unexpected Term in std-infer-expr\n\{term}\n");

0 commit comments

Comments
 (0)