diff --git a/packages/squiggle-lang/src/rescript/ProgramEvaluator.res b/packages/squiggle-lang/src/rescript/ProgramEvaluator.res index f69d2c43..fe618782 100644 --- a/packages/squiggle-lang/src/rescript/ProgramEvaluator.res +++ b/packages/squiggle-lang/src/rescript/ProgramEvaluator.res @@ -36,7 +36,7 @@ module Inputs = { } } -type \"export" = [ +type exported = [ | #DistPlus(DistPlus.t) | #Float(float) | #Function( @@ -126,7 +126,7 @@ let coersionToExportedTypes = ( inputs, env: ASTTypes.environment, node: ASTTypes.node, -): result<\"export", string> => +): result => node |> renderIfNeeded(inputs) |> E.R.bind(_, x => diff --git a/packages/squiggle-lang/src/rescript/interpreter/ASTEvaluator.res b/packages/squiggle-lang/src/rescript/interpreter/ASTEvaluator.res index 5cadff89..2a5227a4 100644 --- a/packages/squiggle-lang/src/rescript/interpreter/ASTEvaluator.res +++ b/packages/squiggle-lang/src/rescript/interpreter/ASTEvaluator.res @@ -75,6 +75,8 @@ module AlgebraicCombination = { } module PointwiseCombination = { + //TODO: This is crude and slow. It forces everything to be pointSetDist, even though much + //of the process could happen on symbolic distributions without a conversion to be a pointSetDist. let pointwiseAdd = (evaluationParams: evaluationParams, t1: t, t2: t) => switch (Node.render(evaluationParams, t1), Node.render(evaluationParams, t2)) { | (Ok(#RenderedDist(rs1)), Ok(#RenderedDist(rs2))) =>