Fixed the linting of reducer files

This commit is contained in:
Ozzie Gooen 2022-04-23 12:25:33 -04:00
parent d6e4f77624
commit 21975f2c0b
5 changed files with 12 additions and 5 deletions

View File

@ -9,3 +9,4 @@ packages/website/.docusaurus
packages/squiggle-lang/lib packages/squiggle-lang/lib
packages/squiggle-lang/.nyc_output/ packages/squiggle-lang/.nyc_output/
packages/squiggle-lang/coverage/ packages/squiggle-lang/coverage/
packages/squiggle-lang/.cache/

View File

@ -16,7 +16,7 @@ Squiggle is currently pre-alpha.
# Bug reports # Bug reports
Anyone (with a github account) can file an issue at any time. Please allow Quinn, Sam, and Ozzie to triage, but otherwise just follow the suggestions in the issue templates. Anyone (with a github account) can file an issue at any time. Please allow Quinn, Sam, and Ozzie to triage, but otherwise just follow the suggestions in the issue templates.
# Project structure # Project structure
@ -46,11 +46,11 @@ You can't run `yarn` outside of a FHS shell. Additionally, you need to `patchelf
./nixos.sh ./nixos.sh
``` ```
Reasons for this are comments in the script. Then, you should be able to do all the package-level `yarn run` commands/scripts. Reasons for this are comments in the script. Then, you should be able to do all the package-level `yarn run` commands/scripts.
# Try not to push directly to develop # Try not to push directly to develop
If you absolutely must, please prefix your commit message with `hotfix: `. If you absolutely must, please prefix your commit message with `hotfix: `.
# Pull request protocol # Pull request protocol

View File

@ -4,3 +4,4 @@ lib
*.gen.tsx *.gen.tsx
.nyc_output/ .nyc_output/
coverage/ coverage/
.cache/

View File

@ -17,7 +17,10 @@ let expectEvalToBe = (expr: string, answer: string) =>
Reducer.evaluate(expr)->ExpressionValue.toStringResult->expect->toBe(answer) Reducer.evaluate(expr)->ExpressionValue.toStringResult->expect->toBe(answer)
let expectEvalBindingsToBe = (expr: string, bindings: Reducer.externalBindings, answer: string) => let expectEvalBindingsToBe = (expr: string, bindings: Reducer.externalBindings, answer: string) =>
Reducer.evaluateUsingExternalBindings(expr, bindings)->ExpressionValue.toStringResult->expect->toBe(answer) Reducer.evaluateUsingExternalBindings(expr, bindings)
->ExpressionValue.toStringResult
->expect
->toBe(answer)
let expectEvalPartialBindingsToBe = ( let expectEvalPartialBindingsToBe = (
expr: string, expr: string,

View File

@ -136,7 +136,9 @@ let evalPartialUsingExternalBindings_ = (codeText: string, bindings: T.bindings)
Therefore all statments are assignments. Therefore all statments are assignments.
*/ */
let evalOuterWBindings_ = (codeText: string, bindings: T.bindings) => { let evalOuterWBindings_ = (codeText: string, bindings: T.bindings) => {
parseOuter(codeText)->Result.flatMap(expression => expression->evalUsingExternalBindingsExpression_(bindings)) parseOuter(codeText)->Result.flatMap(expression =>
expression->evalUsingExternalBindingsExpression_(bindings)
)
} }
/* /*