Skip to content

Fix period and optionals in testcase editor#207

Merged
rprimet merged 6 commits into
masterfrom
fix-period-and-optionals
Mar 5, 2026
Merged

Fix period and optionals in testcase editor#207
rprimet merged 6 commits into
masterfrom
fix-period-and-optionals

Conversation

@vincent-botbol

Copy link
Copy Markdown
Collaborator

This PR fixes the testcase output of stdlib's implicit structures (such as Period) and their types.
It also add support for optional values.

Depends on CatalaLang/catala#977

@vincent-botbol vincent-botbol requested a review from rprimet March 4, 2026 13:31

@rprimet rprimet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! I tested it manually and it works, I suggest two changes (I pushed the corresponding commits, feel free to discard)


let unsupported fmt = Format.ksprintf (fun msg -> raise (Unsupported msg)) fmt

let implicit_stdlib_alias, lookup_aliased_name =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it seems that implicit_stdlib_alias is unused, I took the liberty of removing it (don't hesitate to drop my extra commits if not relevant/bad)

in
let fr_names =
["Date"; "MoisAnnée"; "Période"; "Argent"; "Entier"; "Décimal"; "Liste"]
@ List.map (fun s -> s ^ "_fr") en_names

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will produce unneeded module names like Period_en_fr

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Well spotted.

@vincent-botbol vincent-botbol force-pushed the fix-period-and-optionals branch from 8612fb9 to 9f9bc28 Compare March 5, 2026 11:02
@rprimet rprimet merged commit 92f127a into master Mar 5, 2026
2 checks passed
@rprimet rprimet deleted the fix-period-and-optionals branch March 5, 2026 12:48
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.

3 participants