Description
Create a built-in "generic-type function" that takes two arguments, a Wikidata entity reference type and a Typed list of Wikidata entity references, and returns a Type (a "lightweight enum type"). The entity references, in the 2nd argument, must be 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 "created" by the Generic-type function. (This ZID is determined by WikiLambda.)
- Define the generic-type function and its built-in implementation in function-schemata. Z6884 and Z6984 have been suggested for these.
- Write the orchestrator code for the built-in implementation.
- The code must check the input values and return an error if they don't have the right types.
- Define the validator function for the lightweight enum types returned from the generic-type function, and its built-in implementation.
- Write the orchestrator code for the built-in validator implementation.
- Define the equality function for the lightweight enum types returned from the the generic-type function, and its built-in implementation.
- Write the orchestrator code for the built-in equality implementation.
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