-
Notifications
You must be signed in to change notification settings - Fork 0
Handle DUs in arg parser #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
OK. Strategy: an in-progress universe of types. The in-progress of a record type is that same type but where we add options to everything primitive that's not already optional, and replace nonprimitives with their in-progress type. The in-progress of a DU (where every case must contain data) is the list of all DU cases, where all contents are replaced by their in-progress type. To finalise the in-progress DU, we finalise every case and assert that exactly one finalised successfully. To finalise the in-progress record, we finalise its fields. The finalisation of an in-progress primitive is "if it was non-optional, The parser consumes one argument after another in a loop:
Positionals are gathered at the top level, not by an individual parser, and they are injected on finalisation. |
No description provided.