squiggle/packages/squiggle-lang/src/rescript/GenericDist/GenericDist_GenericOperation.resi

29 lines
920 B
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 toString: t => option<string>
let toError: t => option<GenericDist_Types.error>
let fmap: (~env: env, t, GenericDist_Types.Operation.singleParamaterFunction) => t
}