Comment out some stuff, fix annoying react key prop error

This commit is contained in:
Sebastian Kosch 2020-06-09 21:43:35 -07:00
parent eb0ffdc6c3
commit fa1bf75acc
3 changed files with 6 additions and 10 deletions

View File

@ -339,7 +339,7 @@ let make = (~distPlus: DistTypes.distPlus) => {
<div> <div>
{state.distributions {state.distributions
|> E.L.fmapi((index, config) => |> E.L.fmapi((index, config) =>
<div className="flex"> <div className="flex" key={string_of_int(index)}>
<div className="w-4/5"> <div className="w-4/5">
<Chart distPlus config onHover={r => {setX(_ => r)}} /> <Chart distPlus config onHover={r => {setX(_ => r)}} />
</div> </div>

View File

@ -263,11 +263,8 @@ module MathAdtToDistDst = {
| Object(_) => Error("Object not valid as top level") | Object(_) => Error("Object not valid as top level")
); );
let run = (r): result(SymbolicDist.bigDist, string) => { let run = (r): result(SymbolicDist.bigDist, string) =>
let o = r |> MathAdtCleaner.run |> topLevel; r |> MathAdtCleaner.run |> topLevel;
Js.log2("parser output", o);
o
};
}; };
let fromString = str => { let fromString = str => {
@ -282,7 +279,6 @@ let fromString = str => {
let mathJsToJson = Mathjs.parseMath(str); let mathJsToJson = Mathjs.parseMath(str);
let mathJsParse = let mathJsParse =
E.R.bind(mathJsToJson, r => { E.R.bind(mathJsToJson, r => {
Js.log2("parsed", r);
switch (MathJsonToMathJsAdt.run(r)) { switch (MathJsonToMathJsAdt.run(r)) {
| Some(r) => Ok(r) | Some(r) => Ok(r)
| None => Error("MathJsParse Error") | None => Error("MathJsParse Error")

View File

@ -64,7 +64,7 @@ type dist = [
- IndependentVariableProduct(WeightedDist, WeightedDist) [i.e. distribution product] - IndependentVariableProduct(WeightedDist, WeightedDist) [i.e. distribution product]
*/ */
type weightedDist = (float, dist); /*type weightedDist = (float, dist);
type bigDistTree = type bigDistTree =
/* | DistLeaf(dist) */ /* | DistLeaf(dist) */
@ -79,7 +79,7 @@ let rec treeIntegral = item => {
| PointwiseNormalizedDistSum(childTrees) => | PointwiseNormalizedDistSum(childTrees) =>
childTrees |> E.A.fmap(treeIntegral) |> E.A.Floats.sum childTrees |> E.A.fmap(treeIntegral) |> E.A.Floats.sum
}; };
}; };*/
/* bigDist can either be a single distribution, or a /* bigDist can either be a single distribution, or a
PointwiseCombination, i.e. an array of (dist, weight) tuples */ PointwiseCombination, i.e. an array of (dist, weight) tuples */