Description
hybridToCanonical is not meant to handle normal-form inputs in general, but there are still some situations in which it might receive a normal-form input. These need to be handled carefully to avoid improper translations, and exceptions that can lead to undiagnosed errors downstream.
- If a programming language exception is raised, should hybridToCanonical return a ZError? If so, which one?
- Should hybridToCanonical perform any checks to see if it receives a normal-form input which is not meant to be handled?
- Note the nested function listifyArray has the potential to return incorrect results for a normal-form input (because it does not put the type at the beginning of the canonical list that it returns). Let's make sure no improper translations are possible.
Note: Converting all normal-form inputs properly to canonical could be a nontrivial effort (based on comparison to function-schemata's canonicalize() method), and would result in additional code functionality that duplicates function-schemata. It may make sense to hold off on that objective until we've arranged for function-schemata's canonicalize() method to be available.
Desired behavior/Acceptance criteria
- ...
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#Front-end_Task/Bug_Completion_Checklist