2022-03-29 09:09:59 +00:00
|
|
|
module ErrorValue = Reducer_ErrorValue
|
|
|
|
module Expression = Reducer_Expression
|
2022-04-11 01:18:38 +00:00
|
|
|
|
2022-04-27 20:24:06 +00:00
|
|
|
@genType
|
2022-04-27 20:00:42 +00:00
|
|
|
type environment = ReducerInterface_ExpressionValue.environment
|
2022-04-27 20:24:06 +00:00
|
|
|
@genType
|
2022-04-27 20:00:42 +00:00
|
|
|
type errorValue = Reducer_ErrorValue.errorValue
|
2022-04-27 20:24:06 +00:00
|
|
|
@genType
|
2022-04-22 14:48:34 +00:00
|
|
|
type expressionValue = ReducerInterface_ExpressionValue.expressionValue
|
2022-04-27 20:24:06 +00:00
|
|
|
@genType
|
2022-04-22 14:48:34 +00:00
|
|
|
type externalBindings = ReducerInterface_ExpressionValue.externalBindings
|
2022-05-04 18:44:46 +00:00
|
|
|
@genType
|
|
|
|
type lambdaValue = ReducerInterface_ExpressionValue.lambdaValue
|
|
|
|
|
2022-04-27 20:24:06 +00:00
|
|
|
@genType
|
2022-04-27 20:00:42 +00:00
|
|
|
let evaluateUsingOptions: (
|
2022-04-27 20:24:06 +00:00
|
|
|
~environment: option<QuriSquiggleLang.ReducerInterface_ExpressionValue.environment>,
|
|
|
|
~externalBindings: option<QuriSquiggleLang.ReducerInterface_ExpressionValue.externalBindings>,
|
2022-04-17 17:24:39 +00:00
|
|
|
string,
|
2022-04-27 20:00:42 +00:00
|
|
|
) => result<expressionValue, errorValue>
|
2022-04-27 20:24:06 +00:00
|
|
|
@genType
|
2022-04-29 17:03:58 +00:00
|
|
|
let evaluatePartialUsingExternalBindings: (
|
|
|
|
string,
|
|
|
|
QuriSquiggleLang.ReducerInterface_ExpressionValue.externalBindings,
|
|
|
|
QuriSquiggleLang.ReducerInterface_ExpressionValue.environment,
|
|
|
|
) => result<externalBindings, errorValue>
|
|
|
|
@genType
|
2022-04-27 20:00:42 +00:00
|
|
|
let evaluate: string => result<expressionValue, errorValue>
|
|
|
|
|
|
|
|
let parse: string => result<Expression.expression, errorValue>
|
2022-05-04 18:44:46 +00:00
|
|
|
|
|
|
|
@genType
|
|
|
|
let foreignFunctionInterface: (
|
|
|
|
QuriSquiggleLang.ReducerInterface_ExpressionValue.lambdaValue,
|
|
|
|
array<QuriSquiggleLang.ReducerInterface_ExpressionValue.expressionValue>,
|
|
|
|
QuriSquiggleLang.ReducerInterface_ExpressionValue.environment,
|
|
|
|
) => result<expressionValue, errorValue>
|
|
|
|
|
|
|
|
@genType
|
|
|
|
let defaultEnvironment: environment
|
|
|
|
|
|
|
|
@genType
|
|
|
|
let defaultExternalBindings: externalBindings
|