Merge pull request #323 from quantified-uncertainty/fix-reducer-warnings

Fix rescript warnings
This commit is contained in:
Ozzie Gooen 2022-04-20 14:17:28 -04:00 committed by GitHub
commit e83d5b111d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -35,6 +35,7 @@ The playground depends on the components library which then depends on the langu
# Develop
For any project in the repo, begin by running `yarn` in the top level
```sh
yarn
```

View File

@ -44,7 +44,7 @@ let defaultBindings: T.bindings = Belt.Map.String.empty
/*
Recursively evaluate/reduce the expression (Lisp AST)
*/
let rec reduceExpression = (expression: t, bindings: T.bindings): result<expressionValue, 'e> => {
let reduceExpression = (expression: t, bindings: T.bindings): result<expressionValue, 'e> => {
/*
After reducing each level of expression(Lisp AST), we have a value list to evaluate
*/
@ -135,6 +135,7 @@ let rec reduceExpression = (expression: t, bindings: T.bindings): result<express
)
racc->Result.flatMap(acc => acc->doMacroCall(bindings))
}
| T.EBindings(bindings) => T.EBindings(bindings)->Ok
}
let rec reduceExpandedExpression = (expression: t): result<expressionValue, 'e> =>
@ -155,6 +156,7 @@ let rec reduceExpression = (expression: t, bindings: T.bindings): result<express
)
racc->Result.flatMap(acc => acc->reduceValueList)
}
| T.EBindings(bindings) => RETodo("Cannot return bindings")->Error
}
let rExpandedExpression: result<t, 'e> = expression->seekMacros(bindings)