diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res index 2fd2a976..1bb26e28 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res @@ -4,7 +4,7 @@ open Jest open Expect let expectEvalToBe = (expr: string, answer: string) => - Reducer.eval(expr)->ExpressionValue.toStringResult->expect->toBe(answer) + Reducer.evaluate(expr)->ExpressionValue.toStringResult->expect->toBe(answer) describe("builtin", () => { // All MathJs operators and functions are available for string, number and boolean diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_TestHelpers.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_TestHelpers.res index 65f689cc..e6183ba0 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_TestHelpers.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_TestHelpers.res @@ -8,4 +8,4 @@ let expectParseToBe = (expr: string, answer: string) => Reducer.parse(expr)->Expression.toStringResult->expect->toBe(answer) let expectEvalToBe = (expr: string, answer: string) => - Reducer.eval(expr)->ExpressionValue.toStringResult->expect->toBe(answer) + Reducer.evaluate(expr)->ExpressionValue.toStringResult->expect->toBe(answer) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer.res index bc5f496d..6e8dbdfa 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer.res @@ -5,5 +5,5 @@ module Extra = Reducer_Extra module Js = Reducer_Js module MathJs = Reducer_MathJs -let eval = Expression.eval +let evaluate = Expression.eval let parse = Expression.parse diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi b/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi index 65b2a62a..cf015a95 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi @@ -4,5 +4,7 @@ module Expression = Reducer_Expression module Extra = Reducer_Extra module Js = Reducer_Js module MathJs = Reducer_MathJs -let eval: string => result + +@genType +let evaluate: string => result let parse: string => result