From 5e9552772b1f5ff0d7134487f301d67cea72b972 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 15:33:55 +0000 Subject: [PATCH 01/13] Bump @testing-library/user-event from 14.1.0 to 14.1.1 Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 14.1.0 to 14.1.1. - [Release notes](https://github.com/testing-library/user-event/releases) - [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/user-event/compare/v14.1...v14.1.1) --- updated-dependencies: - dependency-name: "@testing-library/user-event" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/components/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index 9b4e9fdd..a8e1fc8b 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -6,7 +6,7 @@ "@react-hook/size": "^2.1.2", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.0.1", - "@testing-library/user-event": "^14.0.4", + "@testing-library/user-event": "^14.1.1", "@types/jest": "^27.4.0", "@types/lodash": "^4.14.181", "@types/node": "^17.0.24", diff --git a/yarn.lock b/yarn.lock index e72d8035..59967c75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3677,10 +3677,10 @@ "@testing-library/dom" "^8.5.0" "@types/react-dom" "^18.0.0" -"@testing-library/user-event@^14.0.4": - version "14.1.0" - resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.1.0.tgz#db479c06271b72a4d41cf595ec2ad7ff078c1d72" - integrity sha512-+CGfMXlVM+OwREHDEsfTGsXIMI+rjr3a7YBUSutq7soELht+8kQrM5k46xa/WLfHdtX/wqsDIleL6bi4i+xz0w== +"@testing-library/user-event@^14.1.1": + version "14.1.1" + resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.1.1.tgz#e1ff6118896e4b22af31e5ea2f9da956adde23d8" + integrity sha512-XrjH/iEUqNl9lF2HX9YhPNV7Amntkcnpw0Bo1KkRzowNDcgSN9i0nm4Q8Oi5wupgdfPaJNMAWa61A+voD6Kmwg== "@tootallnate/once@1": version "1.1.2" From 2e9daa7043025222f207b237c100f02d2b012ffc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 16:10:52 +0000 Subject: [PATCH 02/13] Bump @testing-library/react from 13.0.1 to 13.1.1 Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 13.0.1 to 13.1.1. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v13.0.1...v13.1.1) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/components/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index a8e1fc8b..aa9ea2fb 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -5,7 +5,7 @@ "@quri/squiggle-lang": "0.2.2", "@react-hook/size": "^2.1.2", "@testing-library/jest-dom": "^5.16.4", - "@testing-library/react": "^13.0.1", + "@testing-library/react": "^13.1.1", "@testing-library/user-event": "^14.1.1", "@types/jest": "^27.4.0", "@types/lodash": "^4.14.181", diff --git a/yarn.lock b/yarn.lock index 59967c75..939d011f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3668,10 +3668,10 @@ lodash "^4.17.15" redent "^3.0.0" -"@testing-library/react@^13.0.1": - version "13.0.1" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-13.0.1.tgz#00d223e182923d341a9610590561fb9dd1324110" - integrity sha512-zeHx3PohYYp+4bTJwrixQY8zSBZjWUGwYc7OhD1EpWTHS92RleApLoP72NdwaWxOrM1P1Uezt3XvGf6t2XSWPQ== +"@testing-library/react@^13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-13.1.1.tgz#6c1635e25acca8ca5be8ee3b19ad1391681c5846" + integrity sha512-8mirlAa0OKaUvnqnZF6MdAh2tReYA2KtWVw1PKvaF5EcCZqgK5pl8iF+3uW90JdG5Ua2c2c2E2wtLdaug3dsVg== dependencies: "@babel/runtime" "^7.12.5" "@testing-library/dom" "^8.5.0" From 3959bd6894f8da7d144d874d31a6d6086c65a1ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 14:40:08 +0000 Subject: [PATCH 03/13] Bump @types/lodash from 4.14.181 to 4.14.182 Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.181 to 4.14.182. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/components/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index aa9ea2fb..10895f88 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -8,7 +8,7 @@ "@testing-library/react": "^13.1.1", "@testing-library/user-event": "^14.1.1", "@types/jest": "^27.4.0", - "@types/lodash": "^4.14.181", + "@types/lodash": "^4.14.182", "@types/node": "^17.0.24", "@types/react": "^18.0.3", "@types/react-dom": "^18.0.1", diff --git a/yarn.lock b/yarn.lock index 939d011f..2b5f1afe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3934,10 +3934,10 @@ resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.11.1.tgz#34de04477dcf79e2ef6c8d23b41a3d81f9ebeaf5" integrity sha512-DUlIj2nk0YnJdlWgsFuVKcX27MLW0KbKmGVoUHmFr+74FYYNUDAaj9ZqTADvsbE8rfxuVmSFc7KczYn5Y09ozg== -"@types/lodash@^4.14.181": - version "4.14.181" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.181.tgz#d1d3740c379fda17ab175165ba04e2d03389385d" - integrity sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag== +"@types/lodash@^4.14.182": + version "4.14.182" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" + integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== "@types/mdast@^3.0.0": version "3.0.10" From eb578e3d000f2840b2251b7b188b5bd9817a7a33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 14:42:16 +0000 Subject: [PATCH 04/13] Bump mathjs from 10.4.3 to 10.5.0 Bumps [mathjs](https://github.com/josdejong/mathjs) from 10.4.3 to 10.5.0. - [Release notes](https://github.com/josdejong/mathjs/releases) - [Changelog](https://github.com/josdejong/mathjs/blob/develop/HISTORY.md) - [Commits](https://github.com/josdejong/mathjs/compare/v10.4.3...v10.5.0) --- updated-dependencies: - dependency-name: mathjs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/squiggle-lang/package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/squiggle-lang/package.json b/packages/squiggle-lang/package.json index ad6265f8..fa551fae 100644 --- a/packages/squiggle-lang/package.json +++ b/packages/squiggle-lang/package.json @@ -28,7 +28,7 @@ "@glennsl/bs-json": "^5.0.2", "jstat": "^1.9.5", "lodash": "4.17.21", - "mathjs": "10.4.3", + "mathjs": "10.5.0", "pdfast": "^0.2.0", "rationale": "0.2.0", "rescript": "^9.1.4", diff --git a/yarn.lock b/yarn.lock index 939d011f..3d81a0d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1271,7 +1271,7 @@ core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.10.4", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.8", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.10.4", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.8", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.17.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== @@ -6458,7 +6458,7 @@ commondir@^1.0.1: resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= -complex.js@^2.1.0: +complex.js@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/complex.js/-/complex.js-2.1.1.tgz#0675dac8e464ec431fb2ab7d30f41d889fb25c31" integrity sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg== @@ -11451,13 +11451,13 @@ marked@^1.2.9: resolved "https://registry.yarnpkg.com/marked/-/marked-1.2.9.tgz#53786f8b05d4c01a2a5a76b7d1ec9943d29d72dc" integrity sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw== -mathjs@10.4.3: - version "10.4.3" - resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-10.4.3.tgz#456ae944204809e8e8266ff265b1ef724d03f90e" - integrity sha512-C50lWorCOplBec9Ik5fzhHuOx4G4+mtdz3r1G2I1/r8yj+CpYFXLXNqTdg59oKmIF1tKcIzpxlC4s2dGL7f3pg== +mathjs@10.5.0: + version "10.5.0" + resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-10.5.0.tgz#f81d0518fe7b4b2a0b85e1125b8ecfc364fb0292" + integrity sha512-gRnSY9psN9zgiB2QV9F4XbuX5hwjxY5Ou7qoTFWDbn2vZ3UEs+sjfK/SRg2WP30TNfZWpwlGdp8H1knFJnpFdA== dependencies: - "@babel/runtime" "^7.17.8" - complex.js "^2.1.0" + "@babel/runtime" "^7.17.9" + complex.js "^2.1.1" decimal.js "^10.3.1" escape-latex "^1.2.0" fraction.js "^4.2.0" From 52644dfde48abe56c645b65abc4ba7e8276be0f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 14:46:57 +0000 Subject: [PATCH 05/13] Bump @types/node from 17.0.24 to 17.0.25 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.24 to 17.0.25. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/components/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index 10895f88..a6655670 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -9,7 +9,7 @@ "@testing-library/user-event": "^14.1.1", "@types/jest": "^27.4.0", "@types/lodash": "^4.14.182", - "@types/node": "^17.0.24", + "@types/node": "^17.0.25", "@types/react": "^18.0.3", "@types/react-dom": "^18.0.1", "antd": "^4.19.3", diff --git a/yarn.lock b/yarn.lock index 2b5f1afe..5fd11b7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3964,10 +3964,10 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@^17.0.24", "@types/node@^17.0.5": - version "17.0.24" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.24.tgz#20ba1bf69c1b4ab405c7a01e950c4f446b05029f" - integrity sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g== +"@types/node@*", "@types/node@^17.0.25", "@types/node@^17.0.5": + version "17.0.25" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.25.tgz#527051f3c2f77aa52e5dc74e45a3da5fb2301448" + integrity sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w== "@types/node@^14.0.10": version "14.18.13" From 017cbe7274d6888f931b82805946b843abd1af5f Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 20 Apr 2022 11:22:10 -0400 Subject: [PATCH 06/13] hotfix: `cauchy` in binary dist constructors --- .../ReducerInterface/ReducerInterface_GenericDistribution.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res index f7381f07..b20eb168 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res @@ -182,7 +182,7 @@ let dispatchToGenericOutput = (call: ExpressionValue.functionCall): option< ->E.R.bind(r => r(f1)) ->SymbolicConstructors.symbolicResultToOutput | ( - ("normal" | "uniform" | "beta" | "lognormal" | "to") as fnName, + ("normal" | "uniform" | "beta" | "lognormal" | "cauchy" | "to") as fnName, [EvNumber(f1), EvNumber(f2)], ) => SymbolicConstructors.twoFloat(fnName) From 0540fef63a38db2549e63a579557dcd5b3838422 Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 20 Apr 2022 11:39:00 -0400 Subject: [PATCH 07/13] Update ReducerInterface_GenericDistribution.res --- .../ReducerInterface/ReducerInterface_GenericDistribution.res | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res index b20eb168..a15c4082 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res @@ -149,6 +149,7 @@ module SymbolicConstructors = { | "uniform" => Ok(SymbolicDist.Uniform.make) | "beta" => Ok(SymbolicDist.Beta.make) | "lognormal" => Ok(SymbolicDist.Lognormal.make) + | "cauchy" => Ok(SymbolicDist.Cauchy.make) | "to" => Ok(SymbolicDist.From90thPercentile.make) | _ => Error("Unreachable state") } From 5875880c06c1341d077b121f5c988d4c3344d2b2 Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 20 Apr 2022 11:44:33 -0400 Subject: [PATCH 08/13] nested `Ok` because `cauchy` requires no input validation --- .../ReducerInterface/ReducerInterface_GenericDistribution.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res index a15c4082..8a379882 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res @@ -149,7 +149,7 @@ module SymbolicConstructors = { | "uniform" => Ok(SymbolicDist.Uniform.make) | "beta" => Ok(SymbolicDist.Beta.make) | "lognormal" => Ok(SymbolicDist.Lognormal.make) - | "cauchy" => Ok(SymbolicDist.Cauchy.make) + | "cauchy" => Ok(Ok(SymbolicDist.Cauchy.make)) | "to" => Ok(SymbolicDist.From90thPercentile.make) | _ => Error("Unreachable state") } From 4631c183d9bd8ef0aba1ceb78eab16abcf9f0c3d Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 20 Apr 2022 11:49:41 -0400 Subject: [PATCH 09/13] wrap `#Cauchy` in `Ok` --- .../src/rescript/Distributions/SymbolicDist/SymbolicDist.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res index da722036..c67c2bba 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res @@ -86,7 +86,7 @@ module Exponential = { module Cauchy = { type t = cauchy - let make = (local, scale): symbolicDist => #Cauchy({local: local, scale: scale}) + let make = (local, scale): symbolicDist => Ok(#Cauchy({local: local, scale: scale})) let pdf = (x, t: t) => Jstat.Cauchy.pdf(x, t.local, t.scale) let cdf = (x, t: t) => Jstat.Cauchy.cdf(x, t.local, t.scale) let inv = (p, t: t) => Jstat.Cauchy.inv(p, t.local, t.scale) From cbd93b7e79ea3d51f9b26cc5121b750b7d293f9b Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 20 Apr 2022 11:50:08 -0400 Subject: [PATCH 10/13] back out of double `Ok` --- .../ReducerInterface/ReducerInterface_GenericDistribution.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res index 8a379882..a15c4082 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res @@ -149,7 +149,7 @@ module SymbolicConstructors = { | "uniform" => Ok(SymbolicDist.Uniform.make) | "beta" => Ok(SymbolicDist.Beta.make) | "lognormal" => Ok(SymbolicDist.Lognormal.make) - | "cauchy" => Ok(Ok(SymbolicDist.Cauchy.make)) + | "cauchy" => Ok(SymbolicDist.Cauchy.make) | "to" => Ok(SymbolicDist.From90thPercentile.make) | _ => Error("Unreachable state") } From c101cdac1817801853b0deb22aa1c32bad8acc44 Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 20 Apr 2022 11:54:17 -0400 Subject: [PATCH 11/13] update signature for `result` --- .../src/rescript/Distributions/SymbolicDist/SymbolicDist.res | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res index c67c2bba..dcc9bd5e 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res @@ -86,7 +86,8 @@ module Exponential = { module Cauchy = { type t = cauchy - let make = (local, scale): symbolicDist => Ok(#Cauchy({local: local, scale: scale})) + let make = (local, scale): result => + Ok(#Cauchy({local: local, scale: scale})) let pdf = (x, t: t) => Jstat.Cauchy.pdf(x, t.local, t.scale) let cdf = (x, t: t) => Jstat.Cauchy.cdf(x, t.local, t.scale) let inv = (p, t: t) => Jstat.Cauchy.inv(p, t.local, t.scale) From 806ba864465f4760dca5e0801f16f0680111467f Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Wed, 20 Apr 2022 12:13:31 -0400 Subject: [PATCH 12/13] fixed lint --- packages/squiggle-lang/.prettierignore | 2 ++ .../src/rescript/Distributions/SymbolicDist/SymbolicDist.res | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/squiggle-lang/.prettierignore b/packages/squiggle-lang/.prettierignore index 30674e4d..bc218d9b 100644 --- a/packages/squiggle-lang/.prettierignore +++ b/packages/squiggle-lang/.prettierignore @@ -2,3 +2,5 @@ dist lib *.bs.js *.gen.tsx +.nyc_output/ +coverage/ diff --git a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res index dcc9bd5e..a6eda12b 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res @@ -86,8 +86,9 @@ module Exponential = { module Cauchy = { type t = cauchy - let make = (local, scale): result => - Ok(#Cauchy({local: local, scale: scale})) + let make = (local, scale): result => Ok( + #Cauchy({local: local, scale: scale}), + ) let pdf = (x, t: t) => Jstat.Cauchy.pdf(x, t.local, t.scale) let cdf = (x, t: t) => Jstat.Cauchy.cdf(x, t.local, t.scale) let inv = (p, t: t) => Jstat.Cauchy.inv(p, t.local, t.scale) From c2b93831e3e9c1395b2c1910f44101b724256fe2 Mon Sep 17 00:00:00 2001 From: Sam Nolan Date: Wed, 20 Apr 2022 13:51:27 -0400 Subject: [PATCH 13/13] Fix rescript warnings --- README.md | 1 + .../Reducer/Reducer_Expression/Reducer_Expression.res | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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)