time-to-botec/squiggle/node_modules/@quri/squiggle-lang/src/rescript/Reducer
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00
..
Reducer_Expression feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Extra feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Peggy feat: add the node modules 2022-12-03 12:44:49 +00:00
README.md feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Bindings.bs.js feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Bindings.res feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Context.bs.js feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Context.res feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_FrameStack.bs.js feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_FrameStack.gen.tsx feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_FrameStack.res feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Lambda_T.bs.js feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Lambda_T.res feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Lambda.bs.js feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Lambda.res feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Namespace.bs.js feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Namespace.res feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_T.bs.js feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_T.gen.tsx feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_T.res feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Value.bs.js feat: add the node modules 2022-12-03 12:44:49 +00:00
Reducer_Value.res feat: add the node modules 2022-12-03 12:44:49 +00:00

To interface your library there only 2 files to be modified:

  • Reducer/ReducerInterface/ReducerInterface_ExpressionValue.res

    This is where your additional types are referred for the dispatcher.

  • Reducer/ReducerInterface/ReducerInterface_ExternalLibrary.res

    This is where dispatching to your library is done. If the dispatcher becomes beastly then feel free to divide it into submodules.

The Reducer is built to use different external libraries as well as different external parsers. Both external parsers and external libraries are plugins.

And finally try using Reducer.eval to how your extentions look:

  test("1+2", () => expectEvalToBe( "1+2", "Ok(3)"))