@@ -58,6 +58,7 @@ let std-apply-macro-location(tctx: Maybe<TypeContext>, mname: CString, margs: AS
5858
5959let std-apply-macro(tctx: Maybe<TypeContext>, mname: CString, margs: AST, used: IsUsed, strong: Bool): (TypeContext?, AST) = (
6060 let result = mk-eof();
61+ let peeped-type = ta;
6162 if mname==c"macro::concat" then (tctx, result) = std-apply-macro-concat(tctx, mname, margs)
6263 else if mname==c"macro::location" then (tctx, result) = std-apply-macro-location(tctx, mname, margs)
6364 else if mname==c"macro::variable" then (tctx, result) = std-apply-macro-variable(tctx, mname, margs)
@@ -76,7 +77,7 @@ let std-apply-macro(tctx: Maybe<TypeContext>, mname: CString, margs: AST, used:
7677 peeped = mtype;
7778 };
7879 };
79- (tctx, let peeped-type, margs) = std-infer-peeped-arguments(tctx, margs, peep-holes);
80+ (tctx, peeped-type, margs) = std-infer-peeped-arguments(tctx, margs, peep-holes);
8081
8182 let matched = [] : List<(Type,AST)>;
8283 for list Tuple{mtype=first, mterm=third} in row {
@@ -102,7 +103,7 @@ let std-apply-macro(tctx: Maybe<TypeContext>, mname: CString, margs: AST, used:
102103 (tctx, result) = std-apply-macro-candidates(tctx, mname, margs, candidates);
103104 };
104105
105- if strong and not(non-zero(result)) then exit-error("Failed to Apply Macro: \{mname}\nArgs: \{margs}\n", margs);
106+ if strong and not(non-zero(result)) then exit-error("Failed to Apply Macro: \{mname}\nArgs: \{margs} : \{peeped-type} \n", margs);
106107 if strong {
107108 (tctx, result) = std-infer-expr(tctx, result, false, used, ta);
108109 mark-free-and-seen(result);
0 commit comments