From b73924135f7c7ff866694839d39942edfae9426d Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Sun, 4 Sep 2022 21:52:48 +0200 Subject: [PATCH] format rescritp --- .../SquiggleLibrary_FunctionRegistryLibrary_test.res | 10 ++++++++-- .../src/rescript/ReducerProject/ReducerProject.res | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res b/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res index 50ec2194..831eb271 100644 --- a/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res +++ b/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res @@ -67,9 +67,15 @@ describe("FunctionRegistry Library", () => { testEvalToBe("SampleSet.fromList([3,5,2,3,5,2,3,5,2,3,3,5])", "Ok(Sample Set Distribution)") testEvalToBe("SampleSet.fromList([3,5,2,3,5,2,3,5,2,3,3,5])", "Ok(Sample Set Distribution)") testEvalToBe("SampleSet.fromFn({|| sample(normal(5,2))})", "Ok(Sample Set Distribution)") - testEvalToBe("SampleSet.min(SampleSet.fromDist(normal(50,2)), 2)", "Ok(Sample Set Distribution)") + testEvalToBe( + "SampleSet.min(SampleSet.fromDist(normal(50,2)), 2)", + "Ok(Sample Set Distribution)", + ) testEvalToBe("mean(SampleSet.min(SampleSet.fromDist(normal(50,2)), 2))", "Ok(2)") - testEvalToBe("SampleSet.max(SampleSet.fromDist(normal(50,2)), 10)", "Ok(Sample Set Distribution)") + testEvalToBe( + "SampleSet.max(SampleSet.fromDist(normal(50,2)), 10)", + "Ok(Sample Set Distribution)", + ) testEvalToBe( "addOne(t)=t+1; SampleSet.toList(SampleSet.map(SampleSet.fromList([1,2,3,4,5,6]), addOne))", "Ok([2,3,4,5,6,7])", diff --git a/packages/squiggle-lang/src/rescript/ReducerProject/ReducerProject.res b/packages/squiggle-lang/src/rescript/ReducerProject/ReducerProject.res index 2c25bfb7..948c14c3 100644 --- a/packages/squiggle-lang/src/rescript/ReducerProject/ReducerProject.res +++ b/packages/squiggle-lang/src/rescript/ReducerProject/ReducerProject.res @@ -256,6 +256,11 @@ module Private = { let these = project->getStdLib let ofUser = Continuation.minus(those, these) - (getResultOption(project, "main")->Belt.Option.getWithDefault(InternalExpressionValue.IEvVoid->Ok), ofUser) + ( + getResultOption(project, "main")->Belt.Option.getWithDefault( + InternalExpressionValue.IEvVoid->Ok, + ), + ofUser, + ) } }