Lint for Umur

Value: [1e-8 to 1e-6]
This commit is contained in:
Quinn Dougherty 2022-04-29 14:42:34 -04:00
parent 2c452163b6
commit 0e9996256e
5 changed files with 21 additions and 22 deletions

View File

@ -38,7 +38,6 @@ let dispatchMacroCall = (
| _ => REAssignmentExpected->Error | _ => REAssignmentExpected->Error
} }
let doBindExpression = (bindingExpr: expression, statement: expression, environment) => let doBindExpression = (bindingExpr: expression, statement: expression, environment) =>
switch statement { switch statement {
| ExpressionT.EList(list{ExpressionT.EValue(EvCall("$let")), symbolExpr, statement}) => { | ExpressionT.EList(list{ExpressionT.EValue(EvCall("$let")), symbolExpr, statement}) => {

View File

@ -119,10 +119,15 @@ let evaluatePartialUsingExternalBindings = (
externalBindings: ReducerInterface_ExpressionValue.externalBindings, externalBindings: ReducerInterface_ExpressionValue.externalBindings,
environment: ReducerInterface_ExpressionValue.environment, environment: ReducerInterface_ExpressionValue.environment,
): result<externalBindings, errorValue> => { ): 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 { switch rAnswer {
| Ok(EvRecord(externalBindings)) => Ok(externalBindings) | 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 | Error(err) => err->Error
} }
} }

View File

@ -15,4 +15,3 @@ let jsToEv = (jsValue): result<expressionValue, errorValue> =>
| "string" => jsValue->castString->EvString->Ok | "string" => jsValue->castString->EvString->Ok
| other => RETodo(`Unhandled MathJs literal type: ${Js.String.make(other)}`)->Error | other => RETodo(`Unhandled MathJs literal type: ${Js.String.make(other)}`)->Error
} }

View File

@ -6,9 +6,7 @@ let defaultEnv: DistributionOperation.env = {
xyPointLength: MagicNumbers.Environment.defaultXYPointLength, xyPointLength: MagicNumbers.Environment.defaultXYPointLength,
} }
let runGenericOperation = DistributionOperation.run( let runGenericOperation = DistributionOperation.run(~env=defaultEnv)
~env=defaultEnv,
)
module Helpers = { module Helpers = {
let arithmeticMap = r => let arithmeticMap = r =>
@ -38,7 +36,6 @@ module Helpers = {
| _ => None | _ => None
} }
let toFloatFn = ( let toFloatFn = (
fnCall: DistributionTypes.DistributionOperation.toFloat, fnCall: DistributionTypes.DistributionOperation.toFloat,
dist: DistributionTypes.genericDist, dist: DistributionTypes.genericDist,
@ -140,7 +137,6 @@ module Helpers = {
} }
| _ => GenDistError(ArgumentError("Last argument of mx must be array or distribution")) | _ => GenDistError(ArgumentError("Last argument of mx must be array or distribution"))
} }
} }
module SymbolicConstructors = { module SymbolicConstructors = {