ErrorsStandard library · rule
semantic.standard_operation_moved
Standard-library operation has moved to another name.
Area 19, Standard library; not declinable; the next step is usually the agent's.
An operation the standard library has moved to another name: its edit
writes the new name, and the call is checked as the new operation.
temporal.format has moved to the time types' text.format:
type OrderedAt = Instant {}function placed(at: OrderedAt) -> PresentationText { return temporal.format( at, zone: Zone.europe_london, locale: Locale.en_gb, format: TimeFormat.date_long )}
error temporal.format is now text.format
--> main.jadpo:4:12
|4 | return temporal.format( | ^^^^^^^^^^^^^^^ moved
- reason
- The standard library has one name for each operation;
temporal.formatmoved totext.format, which takes the same values. - next
- Write
text.format(agent) - rule
- semantic.
standard_ operation_ moved - help
- https://jadpo.
dev/docs/errors/semantic. standard_ operation_ moved
collection. has moved to list., set. and map.: a call
through it is reported with an edit to the namespace for its first value,
a list unless it is a set or a map, and checked as that operation where
it is built.
type BatchName = Text { min_length: 1}type BatchCount = Int { min: 0}function batches_baked(bakings: List<BatchName>) -> BatchCount { return BatchCount(collection.count(bakings))}
error collection.count is now list.count
--> main.jadpo:10:23
|10 | return BatchCount(collection.count(bakings)) | ^^^^^^^^^^^^^^^^ moved
- reason
- The standard library has one namespace for each type an operation works on, so
collection.becamelist.,set.andmap.;bakingsis a list. - next
- Write
list.count(agent) - rule
- semantic.
standard_ operation_ moved - help
- https://jadpo.
dev/docs/errors/semantic. standard_ operation_ moved
Markdown for agents: /docs/errors/semantic.standard_operation_moved.md.Built from Jadpo main at aee2e8f.