2022-05-24 21:02:27 +00:00
|
|
|
@genType
|
2022-05-25 23:27:15 +00:00
|
|
|
type arg = Float({min: float, max: float}) | Date({min: Js.Date.t, max: Js.Date.t})
|
|
|
|
|
2022-05-24 21:02:27 +00:00
|
|
|
@genType
|
2022-05-25 23:27:15 +00:00
|
|
|
type declaration<'a> = {
|
|
|
|
fn: 'a,
|
|
|
|
args: array<arg>,
|
|
|
|
}
|
2022-05-24 21:02:27 +00:00
|
|
|
|
|
|
|
module ContinuousFloatArg = {
|
2022-05-25 23:27:15 +00:00
|
|
|
let make = (min: float, max: float): arg => {
|
2022-05-24 21:02:27 +00:00
|
|
|
Float({min: min, max: max})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module ContinuousTimeArg = {
|
2022-05-25 23:27:15 +00:00
|
|
|
let make = (min: Js.Date.t, max: Js.Date.t): arg => {
|
|
|
|
Date({min: min, max: max})
|
2022-05-24 21:02:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-25 23:27:15 +00:00
|
|
|
let make = (fn: 'a, args: array<arg>): declaration<'a> => {
|
|
|
|
{fn: fn, args: args}
|
2022-05-24 21:02:27 +00:00
|
|
|
}
|