From 6eddb5a4af6f0a8473ab3809815d2cab5513777e Mon Sep 17 00:00:00 2001 From: Sam Nolan Date: Thu, 21 Apr 2022 18:19:38 -0400 Subject: [PATCH] Remove warning 20 --- packages/squiggle-lang/bsconfig.json | 2 +- .../src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Eval.res | 2 +- packages/squiggle-lang/src/rescript/Utility/XYShape.res | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/squiggle-lang/bsconfig.json b/packages/squiggle-lang/bsconfig.json index a6e5c255..e529439c 100644 --- a/packages/squiggle-lang/bsconfig.json +++ b/packages/squiggle-lang/bsconfig.json @@ -37,7 +37,7 @@ }, "refmt": 3, "warnings": { - "number": "+A-42-48-9-30-4-102-20" + "number": "+A-42-48-9-30-4-102" }, "ppx-flags": [ ["../../node_modules/bisect_ppx/ppx", "--exclude-files", ".*_test\\.res$$"] diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Eval.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Eval.res index 94a1834c..ab9fb711 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Eval.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Eval.res @@ -12,7 +12,7 @@ type answer = {"value": unit} Rescript cannot type cast on basic values passed on their own. This is why we call evalua inside Javascript and wrap the result in an Object */ -let eval__ = %raw(`function (expr) { return {value: Mathjs.evaluate(expr)}; }`) +let eval__: string => 'a = %raw(`function (expr) { return {value: Mathjs.evaluate(expr)}; }`) /* Call MathJs evaluate and return as a variant diff --git a/packages/squiggle-lang/src/rescript/Utility/XYShape.res b/packages/squiggle-lang/src/rescript/Utility/XYShape.res index 8a40b8f7..1af36cf0 100644 --- a/packages/squiggle-lang/src/rescript/Utility/XYShape.res +++ b/packages/squiggle-lang/src/rescript/Utility/XYShape.res @@ -229,7 +229,7 @@ module Zipped = { module PointwiseCombination = { // t1Interpolator and t2Interpolator are functions from XYShape.XtoY, e.g. linearBetweenPointsExtrapolateFlat. - let combine = %raw(` // : (float => float => float, T.t, T.t, bool) => T.t + let combine: ((float, float) => float, interpolator, T.t, T.t) => T.t = %raw(` // This function combines two xyShapes by looping through both of them simultaneously. // It always moves on to the next smallest x, whether that's in the first or second input's xs, // and interpolates the value on the other side, thus accumulating xs and ys.