diff --git a/README.md b/README.md index ee4d00c8..2f1de7f7 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ The playground depends on the components library which then depends on the langu # Develop For any project in the repo, begin by running `yarn` in the top level + ```sh yarn ``` 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 90e79e8e..b1befa5a 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 @@ -44,7 +44,7 @@ let defaultBindings: T.bindings = Belt.Map.String.empty /* Recursively evaluate/reduce the expression (Lisp AST) */ -let rec reduceExpression = (expression: t, bindings: T.bindings): result => { +let reduceExpression = (expression: t, bindings: T.bindings): result => { /* After reducing each level of expression(Lisp AST), we have a value list to evaluate */ @@ -135,6 +135,7 @@ let rec reduceExpression = (expression: t, bindings: T.bindings): resultResult.flatMap(acc => acc->doMacroCall(bindings)) } + | T.EBindings(bindings) => T.EBindings(bindings)->Ok } let rec reduceExpandedExpression = (expression: t): result => @@ -155,6 +156,7 @@ let rec reduceExpression = (expression: t, bindings: T.bindings): resultResult.flatMap(acc => acc->reduceValueList) } + | T.EBindings(bindings) => RETodo("Cannot return bindings")->Error } let rExpandedExpression: result = expression->seekMacros(bindings)