diff --git a/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_Math_test.res b/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_Math_test.res index 964df490..a8db2854 100644 --- a/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_Math_test.res +++ b/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_Math_test.res @@ -2,6 +2,6 @@ open Jest open Reducer_TestHelpers describe("Math Library", () => { - testEvalToBe("Math.e", "") - testEvalToBe("Math.pi", "") + testEvalToBe("Math.e", "Ok(2.718281828459045)") + testEvalToBe("Math.pi", "Ok(3.141592653589793)") }) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res index 218aa673..33e63496 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res @@ -256,6 +256,7 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce switch call { | ("$_atIndex_$", [EvArray(aValueArray), EvNumber(fIndex)]) => arrayAtIndex(aValueArray, fIndex) + | ("$_atIndex_$", [EvModule(dict), EvString(sIndex)]) => recordAtIndex(dict, sIndex) | ("$_atIndex_$", [EvRecord(dict), EvString(sIndex)]) => recordAtIndex(dict, sIndex) | ("$_constructArray_$", [EvArray(aValueArray)]) => EvArray(aValueArray)->Ok | ("$_constructRecord_$", [EvArray(arrayOfPairs)]) => constructRecord(arrayOfPairs)