Skip to content

Commit

Permalink
filters have indexes on them
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Feb 19, 2024
1 parent 3715335 commit b473ddf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 142 deletions.
139 changes: 0 additions & 139 deletions lint-language-sketching.txt

This file was deleted.

8 changes: 5 additions & 3 deletions src/lib/lint-language/lint-language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,11 @@ export class LLMap extends LLNode {
throw new Error("Type error");
}
const newVal = tryTypes([LLValue], env.options);
const evalFunc = (x: any) => {
// more re-typing in-direction like from the quantifiers
const newEnv = env.set(this.varb, newVal(x));
const idxType = tryTypes([LLValue], env.options);
const evalFunc = (x: any, index: number) => {
const newEnv = env
.set(this.varb, newVal(x))
.set(`index(${this.varb})`, idxType(index + 1));
return this.func.evaluate(newEnv).result;
};
// implicitly ignore the pass back i guess?
Expand Down

0 comments on commit b473ddf

Please sign in to comment.