squiggle/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi

44 lines
1.4 KiB
Plaintext
Raw Normal View History

2022-03-29 09:09:59 +00:00
module ErrorValue = Reducer_ErrorValue
module Expression = Reducer_Expression
2022-04-27 20:24:06 +00:00
@genType
type environment = ReducerInterface_ExpressionValue.environment
2022-04-27 20:24:06 +00:00
@genType
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
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,
) => result<expressionValue, errorValue>
2022-04-27 20:24:06 +00:00
@genType
let evaluatePartialUsingExternalBindings: (
string,
QuriSquiggleLang.ReducerInterface_ExpressionValue.externalBindings,
QuriSquiggleLang.ReducerInterface_ExpressionValue.environment,
) => result<externalBindings, errorValue>
@genType
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