squiggle/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation/DistributionOperation.resi

35 lines
1.0 KiB
Plaintext
Raw Normal View History

type env = {
2022-03-28 12:39:07 +00:00
sampleCount: int,
xyPointLength: int,
}
type outputType =
| Dist(GenericDist_Types.genericDist)
| Float(float)
| String(string)
| GenDistError(GenericDist_Types.error)
2022-03-28 12:39:07 +00:00
let run: (~env: env, GenericDist_Types.Operation.genericFunctionCallInfo) => outputType
2022-03-28 19:14:39 +00:00
let runFromDist: (
~env: env,
~functionCallInfo: GenericDist_Types.Operation.fromDist,
2022-03-28 19:14:39 +00:00
GenericDist_Types.genericDist,
) => outputType
let runFromFloat: (
~env: env,
~functionCallInfo: GenericDist_Types.Operation.fromDist,
float,
) => outputType
2022-03-28 19:14:39 +00:00
module Output: {
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>
let toFloatR: t => result<float, GenericDist_Types.error>
let toString: t => option<string>
let toStringR: t => result<string, GenericDist_Types.error>
let toError: t => option<GenericDist_Types.error>
let fmap: (~env: env, t, GenericDist_Types.Operation.singleParamaterFunction) => t
}