2022-03-31 18:07:39 +00:00
|
|
|
type env = {
|
2022-03-28 12:39:07 +00:00
|
|
|
sampleCount: int,
|
|
|
|
xyPointLength: int,
|
|
|
|
}
|
|
|
|
|
2022-03-31 13:27:36 +00:00
|
|
|
type outputType =
|
|
|
|
| Dist(GenericDist_Types.genericDist)
|
|
|
|
| Float(float)
|
|
|
|
| String(string)
|
|
|
|
| GenDistError(GenericDist_Types.error)
|
2022-03-28 12:39:07 +00:00
|
|
|
|
2022-03-31 18:07:39 +00:00
|
|
|
let run: (~env: env, GenericDist_Types.Operation.genericFunctionCallInfo) => outputType
|
2022-03-28 19:14:39 +00:00
|
|
|
let runFromDist: (
|
2022-03-31 18:07:39 +00:00
|
|
|
~env: env,
|
|
|
|
~functionCallInfo: GenericDist_Types.Operation.fromDist,
|
2022-03-28 19:14:39 +00:00
|
|
|
GenericDist_Types.genericDist,
|
|
|
|
) => outputType
|
2022-03-31 18:15:21 +00:00
|
|
|
let runFromFloat: (
|
|
|
|
~env: env,
|
|
|
|
~functionCallInfo: GenericDist_Types.Operation.fromDist,
|
|
|
|
float,
|
|
|
|
) => outputType
|
2022-03-28 19:14:39 +00:00
|
|
|
|
|
|
|
module Output: {
|
2022-03-31 17:26:29 +00:00
|
|
|
type t = outputType
|
|
|
|
let toDist: t => option<GenericDist_Types.genericDist>
|
|
|
|
let toDistR: t => result<GenericDist_Types.genericDist, GenericDist_Types.error>
|
|
|
|
let toFloat: t => option<float>
|
2022-03-31 23:58:08 +00:00
|
|
|
let toFloatR: t => result<float, GenericDist_Types.error>
|
2022-03-31 17:26:29 +00:00
|
|
|
let toString: t => option<string>
|
2022-03-31 23:58:08 +00:00
|
|
|
let toStringR: t => result<string, GenericDist_Types.error>
|
2022-03-31 17:26:29 +00:00
|
|
|
let toError: t => option<GenericDist_Types.error>
|
2022-03-31 18:07:39 +00:00
|
|
|
let fmap: (~env: env, t, GenericDist_Types.Operation.singleParamaterFunction) => t
|
|
|
|
}
|