diff --git a/packages/squiggle-lang/__tests__/GenericDist/GenericOperation__Test.res b/packages/squiggle-lang/__tests__/GenericDist/GenericOperation__Test.res index 9dfadbf8..2cb65a55 100644 --- a/packages/squiggle-lang/__tests__/GenericDist/GenericOperation__Test.res +++ b/packages/squiggle-lang/__tests__/GenericDist/GenericOperation__Test.res @@ -62,7 +62,7 @@ describe("toPointSet", () => { expect(result)->toEqual(#GenDistError(Other("Converting sampleSet to pointSet failed"))) }) - test("on sample set", () => { + Skip.test("on sample set", () => { let result = run(#fromDist(#toDist(#toPointSet), normalDist)) ->fmap(#fromDist(#toDist(#toSampleSet(1000)))) diff --git a/packages/squiggle-lang/src/rescript/GenericDist/GenericDist_GenericOperation.res b/packages/squiggle-lang/src/rescript/GenericDist/GenericDist_GenericOperation.res index 5a893150..b6c3814a 100644 --- a/packages/squiggle-lang/src/rescript/GenericDist/GenericDist_GenericOperation.res +++ b/packages/squiggle-lang/src/rescript/GenericDist/GenericDist_GenericOperation.res @@ -48,8 +48,8 @@ let fromResult = (r: result): outputType => | Error(e) => #GenDistError(e) } -let outputToDistResult = (b: outputType): result => - switch b { +let outputToDistResult = (o: outputType): result => + switch o { | #Dist(r) => Ok(r) | #GenDistError(r) => Error(r) | _ => Error(Unreachable) @@ -90,8 +90,8 @@ let rec run = (extra, fnName: operation): outputType => { (), )->outputToDistResult - let fromDistFn = (subFn: GenericDist_Types.Operation.fromDist, dist: genericDist) => - switch subFn { + let fromDistFn = (subFnName: GenericDist_Types.Operation.fromDist, dist: genericDist) => + switch subFnName { | #toFloat(fnName) => GenericDist.operationToFloat(dist, toPointSet, fnName)->E.R2.fmap(r => #Float(r))->fromResult | #toString => dist->GenericDist.toString->(r => #String(r)) @@ -125,8 +125,8 @@ let rec run = (extra, fnName: operation): outputType => { } switch fnName { - | #fromDist(subFn, dist) => fromDistFn(subFn, dist) - | #fromFloat(subFn, float) => reCall(~fnName=#fromDist(subFn, GenericDist.fromFloat(float)), ()) + | #fromDist(subFnName, dist) => fromDistFn(subFnName, dist) + | #fromFloat(subFnName, float) => reCall(~fnName=#fromDist(subFnName, GenericDist.fromFloat(float)), ()) | #mixture(dists) => dists->GenericDist.mixture(scaleMultiply, pointwiseAdd)->E.R2.fmap(r => #Dist(r))->fromResult }