Naming refactor of key rescript directories

This commit is contained in:
Ozzie Gooen 2022-04-04 11:59:14 -04:00
parent 51711512fb
commit 60b760f0cd
29 changed files with 9 additions and 9 deletions

View File

@ -1,7 +1,7 @@
open Jest
open Expect
let env: GenericDist_GenericOperation.env = {
let env: DistributionOperation.env = {
sampleCount: 100,
xyPointLength: 100,
}
@ -11,9 +11,9 @@ let normalDist10: GenericDist_Types.genericDist = Symbolic(#Normal({mean: 10.0,
let normalDist20: GenericDist_Types.genericDist = Symbolic(#Normal({mean: 20.0, stdev: 2.0}))
let uniformDist: GenericDist_Types.genericDist = Symbolic(#Uniform({low: 9.0, high: 10.0}))
let {toFloat, toDist, toString, toError} = module(GenericDist_GenericOperation.Output)
let {run} = module(GenericDist_GenericOperation)
let {fmap} = module(GenericDist_GenericOperation.Output)
let {toFloat, toDist, toString, toError} = module(DistributionOperation.Output)
let {run} = module(DistributionOperation)
let {fmap} = module(DistributionOperation.Output)
let run = run(~env)
let outputMap = fmap(~env)
let toExt: option<'a> => 'a = E.O.toExt(
@ -29,7 +29,7 @@ describe("normalize", () => {
describe("mean", () => {
test("for a normal distribution", () => {
let result = GenericDist_GenericOperation.run(~env, FromDist(ToFloat(#Mean), normalDist))
let result = DistributionOperation.run(~env, FromDist(ToFloat(#Mean), normalDist))
expect(result)->toEqual(Float(5.0))
})
})

View File

@ -1,7 +1,7 @@
module ExpressionValue = ReducerInterface_ExpressionValue
type expressionValue = ReducerInterface_ExpressionValue.expressionValue
let runGenericOperation = GenericDist_GenericOperation.run(
let runGenericOperation = DistributionOperation.run(
~env={
sampleCount: 1000,
xyPointLength: 1000,
@ -86,7 +86,7 @@ module SymbolicConstructors = {
let symbolicResultToOutput = (
symbolicResult: result<SymbolicDistTypes.symbolicDist, string>,
): option<GenericDist_GenericOperation.outputType> =>
): option<DistributionOperation.outputType> =>
switch symbolicResult {
| Ok(r) => Some(Dist(Symbolic(r)))
| Error(r) => Some(GenDistError(Other(r)))
@ -98,7 +98,7 @@ module Math = {
}
let dispatchToGenericOutput = (call: ExpressionValue.functionCall): option<
GenericDist_GenericOperation.outputType,
DistributionOperation.outputType,
> => {
let (fnName, args) = call
switch (fnName, args) {
@ -165,7 +165,7 @@ let dispatchToGenericOutput = (call: ExpressionValue.functionCall): option<
}
}
let genericOutputToReducerValue = (o: GenericDist_GenericOperation.outputType): result<
let genericOutputToReducerValue = (o: DistributionOperation.outputType): result<
expressionValue,
Reducer_ErrorValue.errorValue,
> =>