From 2c5c5095b8ad1866aacc7b3c005f374f76585918 Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Fri, 22 Apr 2022 04:51:31 +0200 Subject: [PATCH] moved externalBindings to ReducerInterface --- packages/squiggle-lang/src/rescript/Reducer/Reducer.resi | 4 ++-- .../Reducer/Reducer_Expression/Reducer_Expression.res | 2 +- .../ReducerInterface/ReducerInterface_ExpressionValue.res | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi b/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi index 5416dc6b..8e8835d3 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi @@ -6,9 +6,9 @@ module Js = Reducer_Js module MathJs = Reducer_MathJs @genType -type expressionValue = ReducerInterface_ExpressionValue.expressionValue +type expressionValue = ReducerInterface.ExpressionValue.expressionValue @genType -type externalBindings = Expression.externalBindings +type externalBindings = ReducerInterface.ExpressionValue.externalBindings @genType let evaluate: string => result @genType diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res index 627588d2..f4e0eb39 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res @@ -148,7 +148,7 @@ let eval = (codeText: string) => { ) } -type externalBindings = Js.Dict.t +type externalBindings = ReducerInterface.ExpressionValue.externalBindings //Js.Dict.t let externalBindingsToBindings = (externalBindings: externalBindings): T.bindings => { let keys = Js.Dict.keys(externalBindings) diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExpressionValue.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExpressionValue.res index 32744b0b..2cbd1ead 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExpressionValue.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExpressionValue.res @@ -16,6 +16,9 @@ type rec expressionValue = | EvString(string) | EvSymbol(string) +@genType +type externalBindings = Js.Dict.t + type functionCall = (string, array) let rec toString = aValue =>