further diff improvements. #78
Annotations
10 errors
|
Test
Process completed with exit code 1.
|
|
src/tests/vitest/eval/eval.test.ts > eval > Differentiation > log and exp > diff(fn(x) {exp(x)})(1):
src/services/evaluator/index.ts#L141
ParseError: { readonly _tag: "CallObj"; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> }
└─ ["args"]
└─ ReadonlyArray<<suspended schema>>
└─ [0]
└─ { readonly _tag: "BoolExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly value: boolean } | { readonly _tag: "CallExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> } | { readonly _tag: "FuncExp"; readonly token: { readonly _tag: "fn"; readonly literal: string }; readonly parameters: ReadonlyArray<<suspended schema>>; readonly body: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } } | { readonly _tag: "IdentExp"; readonly token: { readonly _tag: "IDENT"; readonly literal: string }; readonly value: string } | { readonly _tag: "IfExp"; readonly token: { readonly _tag: "if"; readonly literal: "if" }; readonly condition: <suspended schema>; readonly consequence: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> }; readonly alternative?: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } | undefined } | { readonly _tag: "InfixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "+" | "-" | "*" | "/" | "<" | ">" | "==" | "!=" | "**"; readonly left: <suspended schema>; readonly right: <suspended schema> } | { readonly _tag: "IntExp"; readonly token: { readonly _tag: "INT"; readonly literal: string }; readonly value: number } | { readonly _tag: "PrefixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "!" | "-"; readonly right: <suspended schema> } | { readonly _tag: "StrExp"; readonly token: { readonly _tag: "STRING"; readonly literal: string }; readonly value: string } | { readonly _tag: "DiffExp"; readonly token: { readonly _tag: "diff"; readonly literal: string }; readonly exp: <suspended schema>; readonly params: ReadonlyArray<<suspended schema>> } | { readonly _tag: "ArrayExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" |
|
|
src/tests/vitest/eval/eval.test.ts > eval > Differentiation > log and exp > diff(fn(x) {ln(x)})(1):
src/services/evaluator/index.ts#L141
ParseError: { readonly _tag: "CallObj"; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> }
└─ ["args"]
└─ ReadonlyArray<<suspended schema>>
└─ [0]
└─ { readonly _tag: "BoolExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly value: boolean } | { readonly _tag: "CallExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> } | { readonly _tag: "FuncExp"; readonly token: { readonly _tag: "fn"; readonly literal: string }; readonly parameters: ReadonlyArray<<suspended schema>>; readonly body: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } } | { readonly _tag: "IdentExp"; readonly token: { readonly _tag: "IDENT"; readonly literal: string }; readonly value: string } | { readonly _tag: "IfExp"; readonly token: { readonly _tag: "if"; readonly literal: "if" }; readonly condition: <suspended schema>; readonly consequence: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> }; readonly alternative?: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } | undefined } | { readonly _tag: "InfixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "+" | "-" | "*" | "/" | "<" | ">" | "==" | "!=" | "**"; readonly left: <suspended schema>; readonly right: <suspended schema> } | { readonly _tag: "IntExp"; readonly token: { readonly _tag: "INT"; readonly literal: string }; readonly value: number } | { readonly _tag: "PrefixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "!" | "-"; readonly right: <suspended schema> } | { readonly _tag: "StrExp"; readonly token: { readonly _tag: "STRING"; readonly literal: string }; readonly value: string } | { readonly _tag: "DiffExp"; readonly token: { readonly _tag: "diff"; readonly literal: string }; readonly exp: <suspended schema>; readonly params: ReadonlyArray<<suspended schema>> } | { readonly _tag: "ArrayExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" |
|
|
src/tests/vitest/eval/eval.test.ts > eval > Differentiation > trig chain > diff(fn(x) { sin(3 * x + 2) })(0):
src/services/evaluator/index.ts#L141
ParseError: { readonly _tag: "CallObj"; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> }
└─ ["args"]
└─ ReadonlyArray<<suspended schema>>
└─ [0]
└─ { readonly _tag: "BoolExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly value: boolean } | { readonly _tag: "CallExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> } | { readonly _tag: "FuncExp"; readonly token: { readonly _tag: "fn"; readonly literal: string }; readonly parameters: ReadonlyArray<<suspended schema>>; readonly body: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } } | { readonly _tag: "IdentExp"; readonly token: { readonly _tag: "IDENT"; readonly literal: string }; readonly value: string } | { readonly _tag: "IfExp"; readonly token: { readonly _tag: "if"; readonly literal: "if" }; readonly condition: <suspended schema>; readonly consequence: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> }; readonly alternative?: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } | undefined } | { readonly _tag: "InfixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "+" | "-" | "*" | "/" | "<" | ">" | "==" | "!=" | "**"; readonly left: <suspended schema>; readonly right: <suspended schema> } | { readonly _tag: "IntExp"; readonly token: { readonly _tag: "INT"; readonly literal: string }; readonly value: number } | { readonly _tag: "PrefixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "!" | "-"; readonly right: <suspended schema> } | { readonly _tag: "StrExp"; readonly token: { readonly _tag: "STRING"; readonly literal: string }; readonly value: string } | { readonly _tag: "DiffExp"; readonly token: { readonly _tag: "diff"; readonly literal: string }; readonly exp: <suspended schema>; readonly params: ReadonlyArray<<suspended schema>> } | { readonly _tag: "ArrayExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" |
|
|
src/tests/vitest/eval/eval.test.ts > eval > Differentiation > trig > diff(fn(x) {tan(x)})(pi() / 4):
src/services/evaluator/index.ts#L141
ParseError: { readonly _tag: "CallObj"; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> }
└─ ["args"]
└─ ReadonlyArray<<suspended schema>>
└─ [0]
└─ { readonly _tag: "BoolExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly value: boolean } | { readonly _tag: "CallExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> } | { readonly _tag: "FuncExp"; readonly token: { readonly _tag: "fn"; readonly literal: string }; readonly parameters: ReadonlyArray<<suspended schema>>; readonly body: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } } | { readonly _tag: "IdentExp"; readonly token: { readonly _tag: "IDENT"; readonly literal: string }; readonly value: string } | { readonly _tag: "IfExp"; readonly token: { readonly _tag: "if"; readonly literal: "if" }; readonly condition: <suspended schema>; readonly consequence: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> }; readonly alternative?: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } | undefined } | { readonly _tag: "InfixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "+" | "-" | "*" | "/" | "<" | ">" | "==" | "!=" | "**"; readonly left: <suspended schema>; readonly right: <suspended schema> } | { readonly _tag: "IntExp"; readonly token: { readonly _tag: "INT"; readonly literal: string }; readonly value: number } | { readonly _tag: "PrefixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "!" | "-"; readonly right: <suspended schema> } | { readonly _tag: "StrExp"; readonly token: { readonly _tag: "STRING"; readonly literal: string }; readonly value: string } | { readonly _tag: "DiffExp"; readonly token: { readonly _tag: "diff"; readonly literal: string }; readonly exp: <suspended schema>; readonly params: ReadonlyArray<<suspended schema>> } | { readonly _tag: "ArrayExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" |
|
|
src/tests/vitest/eval/eval.test.ts > eval > Differentiation > trig > diff(fn(x) {tan(x)})(0):
src/services/evaluator/index.ts#L141
ParseError: { readonly _tag: "CallObj"; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> }
└─ ["args"]
└─ ReadonlyArray<<suspended schema>>
└─ [0]
└─ { readonly _tag: "BoolExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly value: boolean } | { readonly _tag: "CallExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> } | { readonly _tag: "FuncExp"; readonly token: { readonly _tag: "fn"; readonly literal: string }; readonly parameters: ReadonlyArray<<suspended schema>>; readonly body: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } } | { readonly _tag: "IdentExp"; readonly token: { readonly _tag: "IDENT"; readonly literal: string }; readonly value: string } | { readonly _tag: "IfExp"; readonly token: { readonly _tag: "if"; readonly literal: "if" }; readonly condition: <suspended schema>; readonly consequence: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> }; readonly alternative?: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } | undefined } | { readonly _tag: "InfixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "+" | "-" | "*" | "/" | "<" | ">" | "==" | "!=" | "**"; readonly left: <suspended schema>; readonly right: <suspended schema> } | { readonly _tag: "IntExp"; readonly token: { readonly _tag: "INT"; readonly literal: string }; readonly value: number } | { readonly _tag: "PrefixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "!" | "-"; readonly right: <suspended schema> } | { readonly _tag: "StrExp"; readonly token: { readonly _tag: "STRING"; readonly literal: string }; readonly value: string } | { readonly _tag: "DiffExp"; readonly token: { readonly _tag: "diff"; readonly literal: string }; readonly exp: <suspended schema>; readonly params: ReadonlyArray<<suspended schema>> } | { readonly _tag: "ArrayExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" |
|
|
src/tests/vitest/eval/eval.test.ts > eval > Differentiation > trig > diff(fn(x) {cos(x)})(pi() / 2):
src/services/evaluator/index.ts#L141
ParseError: { readonly _tag: "CallObj"; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> }
└─ ["args"]
└─ ReadonlyArray<<suspended schema>>
└─ [0]
└─ { readonly _tag: "BoolExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly value: boolean } | { readonly _tag: "CallExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> } | { readonly _tag: "FuncExp"; readonly token: { readonly _tag: "fn"; readonly literal: string }; readonly parameters: ReadonlyArray<<suspended schema>>; readonly body: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } } | { readonly _tag: "IdentExp"; readonly token: { readonly _tag: "IDENT"; readonly literal: string }; readonly value: string } | { readonly _tag: "IfExp"; readonly token: { readonly _tag: "if"; readonly literal: "if" }; readonly condition: <suspended schema>; readonly consequence: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> }; readonly alternative?: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } | undefined } | { readonly _tag: "InfixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "+" | "-" | "*" | "/" | "<" | ">" | "==" | "!=" | "**"; readonly left: <suspended schema>; readonly right: <suspended schema> } | { readonly _tag: "IntExp"; readonly token: { readonly _tag: "INT"; readonly literal: string }; readonly value: number } | { readonly _tag: "PrefixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "!" | "-"; readonly right: <suspended schema> } | { readonly _tag: "StrExp"; readonly token: { readonly _tag: "STRING"; readonly literal: string }; readonly value: string } | { readonly _tag: "DiffExp"; readonly token: { readonly _tag: "diff"; readonly literal: string }; readonly exp: <suspended schema>; readonly params: ReadonlyArray<<suspended schema>> } | { readonly _tag: "ArrayExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" |
|
|
src/tests/vitest/eval/eval.test.ts > eval > Differentiation > trig > diff(fn(x) {cos(x)})(0):
src/services/evaluator/index.ts#L141
ParseError: { readonly _tag: "CallObj"; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> }
└─ ["args"]
└─ ReadonlyArray<<suspended schema>>
└─ [0]
└─ { readonly _tag: "BoolExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly value: boolean } | { readonly _tag: "CallExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> } | { readonly _tag: "FuncExp"; readonly token: { readonly _tag: "fn"; readonly literal: string }; readonly parameters: ReadonlyArray<<suspended schema>>; readonly body: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } } | { readonly _tag: "IdentExp"; readonly token: { readonly _tag: "IDENT"; readonly literal: string }; readonly value: string } | { readonly _tag: "IfExp"; readonly token: { readonly _tag: "if"; readonly literal: "if" }; readonly condition: <suspended schema>; readonly consequence: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> }; readonly alternative?: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } | undefined } | { readonly _tag: "InfixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "+" | "-" | "*" | "/" | "<" | ">" | "==" | "!=" | "**"; readonly left: <suspended schema>; readonly right: <suspended schema> } | { readonly _tag: "IntExp"; readonly token: { readonly _tag: "INT"; readonly literal: string }; readonly value: number } | { readonly _tag: "PrefixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "!" | "-"; readonly right: <suspended schema> } | { readonly _tag: "StrExp"; readonly token: { readonly _tag: "STRING"; readonly literal: string }; readonly value: string } | { readonly _tag: "DiffExp"; readonly token: { readonly _tag: "diff"; readonly literal: string }; readonly exp: <suspended schema>; readonly params: ReadonlyArray<<suspended schema>> } | { readonly _tag: "ArrayExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" |
|
|
src/tests/vitest/eval/eval.test.ts > eval > Differentiation > trig > diff(fn(x) {sin(x)})(pi() / 2):
src/services/evaluator/index.ts#L141
ParseError: { readonly _tag: "CallObj"; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> }
└─ ["args"]
└─ ReadonlyArray<<suspended schema>>
└─ [0]
└─ { readonly _tag: "BoolExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly value: boolean } | { readonly _tag: "CallExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> } | { readonly _tag: "FuncExp"; readonly token: { readonly _tag: "fn"; readonly literal: string }; readonly parameters: ReadonlyArray<<suspended schema>>; readonly body: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } } | { readonly _tag: "IdentExp"; readonly token: { readonly _tag: "IDENT"; readonly literal: string }; readonly value: string } | { readonly _tag: "IfExp"; readonly token: { readonly _tag: "if"; readonly literal: "if" }; readonly condition: <suspended schema>; readonly consequence: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> }; readonly alternative?: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } | undefined } | { readonly _tag: "InfixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "+" | "-" | "*" | "/" | "<" | ">" | "==" | "!=" | "**"; readonly left: <suspended schema>; readonly right: <suspended schema> } | { readonly _tag: "IntExp"; readonly token: { readonly _tag: "INT"; readonly literal: string }; readonly value: number } | { readonly _tag: "PrefixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "!" | "-"; readonly right: <suspended schema> } | { readonly _tag: "StrExp"; readonly token: { readonly _tag: "STRING"; readonly literal: string }; readonly value: string } | { readonly _tag: "DiffExp"; readonly token: { readonly _tag: "diff"; readonly literal: string }; readonly exp: <suspended schema>; readonly params: ReadonlyArray<<suspended schema>> } | { readonly _tag: "ArrayExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" |
|
|
src/tests/vitest/eval/eval.test.ts > eval > Differentiation > trig > diff(fn(x) {sin(x)})(0):
src/services/evaluator/index.ts#L141
ParseError: { readonly _tag: "CallObj"; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> }
└─ ["args"]
└─ ReadonlyArray<<suspended schema>>
└─ [0]
└─ { readonly _tag: "BoolExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly value: boolean } | { readonly _tag: "CallExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly fn: <suspended schema>; readonly args: ReadonlyArray<<suspended schema>> } | { readonly _tag: "FuncExp"; readonly token: { readonly _tag: "fn"; readonly literal: string }; readonly parameters: ReadonlyArray<<suspended schema>>; readonly body: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } } | { readonly _tag: "IdentExp"; readonly token: { readonly _tag: "IDENT"; readonly literal: string }; readonly value: string } | { readonly _tag: "IfExp"; readonly token: { readonly _tag: "if"; readonly literal: "if" }; readonly condition: <suspended schema>; readonly consequence: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> }; readonly alternative?: { readonly _tag: "BlockStmt"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly statements: ReadonlyArray<<suspended schema>> } | undefined } | { readonly _tag: "InfixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "+" | "-" | "*" | "/" | "<" | ">" | "==" | "!=" | "**"; readonly left: <suspended schema>; readonly right: <suspended schema> } | { readonly _tag: "IntExp"; readonly token: { readonly _tag: "INT"; readonly literal: string }; readonly value: number } | { readonly _tag: "PrefixExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" | "{" | "}" | "[" | "]" | "!" | "<" | ">" | "*" | "\"" | "\u0000" | "==" | "!=" | "**" | "let" | "if" | "else" | "fn" | "true" | "false" | "return" | "diff" | "" | "STRING" | "INT" | "IDENT"; readonly literal: string | number }; readonly operator: "!" | "-"; readonly right: <suspended schema> } | { readonly _tag: "StrExp"; readonly token: { readonly _tag: "STRING"; readonly literal: string }; readonly value: string } | { readonly _tag: "DiffExp"; readonly token: { readonly _tag: "diff"; readonly literal: string }; readonly exp: <suspended schema>; readonly params: ReadonlyArray<<suspended schema>> } | { readonly _tag: "ArrayExp"; readonly token: { readonly _tag: "=" | "+" | "-" | "/" | "," | ";" | "(" | ")" |
|