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

46 lines
1.5 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
2022-06-24 10:15:38 +00:00
type environment = ReducerInterface_ExternalExpressionValue.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-06-24 10:15:38 +00:00
type expressionValue = ReducerInterface_ExternalExpressionValue.t
2022-04-27 20:24:06 +00:00
@genType
2022-06-24 10:15:38 +00:00
type externalBindings = ReducerInterface_ExternalExpressionValue.externalBindings
2022-05-04 18:44:46 +00:00
@genType
2022-06-24 10:15:38 +00:00
type lambdaValue = ReducerInterface_ExternalExpressionValue.lambdaValue
2022-05-04 18:44:46 +00:00
2022-04-27 20:24:06 +00:00
@genType
let evaluateUsingOptions: (
2022-06-24 10:15:38 +00:00
~environment: option<QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.environment>,
~externalBindings: option<
QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.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,
2022-06-24 10:15:38 +00:00
QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.externalBindings,
QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.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: (
2022-06-24 10:15:38 +00:00
QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.lambdaValue,
array<QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.t>,
QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.environment,
2022-05-04 18:44:46 +00:00
) => result<expressionValue, errorValue>
@genType
let defaultEnvironment: environment
@genType
let defaultExternalBindings: externalBindings