Description
Create a built-in "generic-type function" that takes two arguments, a Wikifunctions type and a list of Z9/reference, and returns a Type (a "lightweight enum type"). The references, in the 2nd argument, must refer to persistent zobjects of the type given in the first argument, and become the elements of the lightweight enum type.
Update: there will also be a 3rd argument, a string which passes the ZID of the new lightweight enum type which is returned from the generic-type function. (This ZID is determined by WikiLambda.)
These functions will be similar to those created by Z6884 (T391221), where the enum elements are limited to Wikidata references. These definitions are placeholders for future work; their implementation and deployment are planned but may not be done immediately.
- Define the generic-type function in function-schemata. Z884 and Z984 have been suggested for these.
- Define the validator function for the lightweight enum types returned from the generic-type function,.
- Define the equality function for the lightweight enum types returned from the the generic-type function.
Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)
- ...
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Back-end_Task/Bug_completion_checklist