Merge branch 'Umur-reducer-dev' into reducer-dev
This commit is contained in:
commit
92918b5dd0
|
@ -38,7 +38,6 @@ let dispatchMacroCall = (
|
|||
| _ => REAssignmentExpected->Error
|
||||
}
|
||||
|
||||
|
||||
let doBindExpression = (bindingExpr: expression, statement: expression, environment) =>
|
||||
switch statement {
|
||||
| ExpressionT.EList(list{ExpressionT.EValue(EvCall("$let")), symbolExpr, statement}) => {
|
||||
|
|
|
@ -119,10 +119,15 @@ let evaluatePartialUsingExternalBindings = (
|
|||
externalBindings: ReducerInterface_ExpressionValue.externalBindings,
|
||||
environment: ReducerInterface_ExpressionValue.environment,
|
||||
): result<externalBindings, errorValue> => {
|
||||
let rAnswer = evaluateUsingOptions(~environment=Some(environment), ~externalBindings=Some(externalBindings), code)
|
||||
let rAnswer = evaluateUsingOptions(
|
||||
~environment=Some(environment),
|
||||
~externalBindings=Some(externalBindings),
|
||||
code,
|
||||
)
|
||||
switch rAnswer {
|
||||
| Ok(EvRecord(externalBindings)) => Ok(externalBindings)
|
||||
| Ok(_) => Error(Reducer_ErrorValue.RESyntaxError(`Partials must end with an assignment or record`))
|
||||
| Ok(_) =>
|
||||
Error(Reducer_ErrorValue.RESyntaxError(`Partials must end with an assignment or record`))
|
||||
| Error(err) => err->Error
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,4 +15,3 @@ let jsToEv = (jsValue): result<expressionValue, errorValue> =>
|
|||
| "string" => jsValue->castString->EvString->Ok
|
||||
| other => RETodo(`Unhandled MathJs literal type: ${Js.String.make(other)}`)->Error
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ module Helpers = {
|
|||
| _ => None
|
||||
}
|
||||
|
||||
|
||||
let toFloatFn = (
|
||||
fnCall: DistributionTypes.DistributionOperation.toFloat,
|
||||
dist: DistributionTypes.genericDist,
|
||||
|
@ -138,7 +137,6 @@ module Helpers = {
|
|||
}
|
||||
| _ => GenDistError(ArgumentError("Last argument of mx must be array or distribution"))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module SymbolicConstructors = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user