moved externalBindings to ReducerInterface

This commit is contained in:
Umur Ozkul 2022-04-22 04:51:31 +02:00
parent 406d0b3470
commit 2c5c5095b8
3 changed files with 6 additions and 3 deletions

View File

@ -6,9 +6,9 @@ module Js = Reducer_Js
module MathJs = Reducer_MathJs module MathJs = Reducer_MathJs
@genType @genType
type expressionValue = ReducerInterface_ExpressionValue.expressionValue type expressionValue = ReducerInterface.ExpressionValue.expressionValue
@genType @genType
type externalBindings = Expression.externalBindings type externalBindings = ReducerInterface.ExpressionValue.externalBindings
@genType @genType
let evaluate: string => result<expressionValue, Reducer_ErrorValue.errorValue> let evaluate: string => result<expressionValue, Reducer_ErrorValue.errorValue>
@genType @genType

View File

@ -148,7 +148,7 @@ let eval = (codeText: string) => {
) )
} }
type externalBindings = Js.Dict.t<expressionValue> type externalBindings = ReducerInterface.ExpressionValue.externalBindings //Js.Dict.t<expressionValue>
let externalBindingsToBindings = (externalBindings: externalBindings): T.bindings => { let externalBindingsToBindings = (externalBindings: externalBindings): T.bindings => {
let keys = Js.Dict.keys(externalBindings) let keys = Js.Dict.keys(externalBindings)

View File

@ -16,6 +16,9 @@ type rec expressionValue =
| EvString(string) | EvString(string)
| EvSymbol(string) | EvSymbol(string)
@genType
type externalBindings = Js.Dict.t<expressionValue>
type functionCall = (string, array<expressionValue>) type functionCall = (string, array<expressionValue>)
let rec toString = aValue => let rec toString = aValue =>