Merge pull request #323 from quantified-uncertainty/fix-reducer-warnings
Fix rescript warnings
This commit is contained in:
commit
e83d5b111d
|
@ -35,6 +35,7 @@ The playground depends on the components library which then depends on the langu
|
||||||
# Develop
|
# Develop
|
||||||
|
|
||||||
For any project in the repo, begin by running `yarn` in the top level
|
For any project in the repo, begin by running `yarn` in the top level
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
|
@ -44,7 +44,7 @@ let defaultBindings: T.bindings = Belt.Map.String.empty
|
||||||
/*
|
/*
|
||||||
Recursively evaluate/reduce the expression (Lisp AST)
|
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
|
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))
|
racc->Result.flatMap(acc => acc->doMacroCall(bindings))
|
||||||
}
|
}
|
||||||
|
| T.EBindings(bindings) => T.EBindings(bindings)->Ok
|
||||||
}
|
}
|
||||||
|
|
||||||
let rec reduceExpandedExpression = (expression: t): result<expressionValue, 'e> =>
|
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)
|
racc->Result.flatMap(acc => acc->reduceValueList)
|
||||||
}
|
}
|
||||||
|
| T.EBindings(bindings) => RETodo("Cannot return bindings")->Error
|
||||||
}
|
}
|
||||||
|
|
||||||
let rExpandedExpression: result<t, 'e> = expression->seekMacros(bindings)
|
let rExpandedExpression: result<t, 'e> = expression->seekMacros(bindings)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user