ErrorsConfiguration · rule
type.clock_context
The operation clock is unavailable in this context.
Area 10, Configuration; not declinable; the next step is usually the agent's.
type ReminderCutoff = Instant {}function cutoff() -> ReminderCutoff { return ReminderCutoff(clock.now)}
error A function can't read clock.now
--> main.jadpo:4:27
|4 | return ReminderCutoff(clock.now) | ^^^^^^^^^ reads the clock
- reason
- A function is pure: it gives the same result for the same arguments, so the time it needs arrives as a parameter; only actions read the clock.
- next
- Pass the time in as a parameter, read in the action that calls this (agent)
- rule
- type.
clock_ context - help
- https://jadpo.
dev/docs/errors/type. clock_ context
Markdown for agents: /docs/errors/type.clock_context.md.Built from Jadpo main at aee2e8f.