Skip to content

Add Integer.sum, etc. to the stdlib#946

Merged
AltGr merged 1 commit intomasterfrom
noseum
Jan 22, 2026
Merged

Add Integer.sum, etc. to the stdlib#946
AltGr merged 1 commit intomasterfrom
noseum

Conversation

@AltGr
Copy link
Contributor

@AltGr AltGr commented Jan 22, 2026

and remove the older syntax 'sum integer of...' from the syntax sheet as a first step to deprecation.

The syntax is still supported, but the parser was patched to no longer recognise sum as a keyword outside of the sum <type> of construct. Therefore, the change shouldn't be breaking, but leave the time to replace the old syntax with the call to the stdlib functions.

The Duration stdlib module was also added, since it wasn't there yet and sum duration of ... is supported.

The tools and grammars don't need any change (this doesn't add syntax, and they're not affected by sum appearing in places where it's not a keyword).

A PR updating the book to advertise the new syntax instead of the old one is proposed at CatalaLang/catala-book#45

Remove the older syntax 'sum integer of...' from the syntax sheet as a first step to deprecation
Copy link
Contributor

@denismerigoux denismerigoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks!

@AltGr AltGr merged commit 2bf2c46 into master Jan 22, 2026
6 checks passed
@AltGr AltGr deleted the noseum branch January 22, 2026 17:14
@github-project-automation github-project-automation bot moved this from In Progress to Done in Catala - language & tooling Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants