~shunter/wayflan#5: 
Add type declarations to type-xcase

#Overview

With only the weirdest possible exception, every event listener accepts events from a single interface. The event name is already known by each clause in event-xcase; if the interface name is known, then there's enough information to determine the types of all event arguments.

All event-xcase clauses are lists by definition, so it will be unambiguous if a symbol is given to provide the interface source.

#Acceptance Criteria

  • Augment event-xcase such that, if the first clause argument is a symbol, it's accepted as the source interface that all incoming events are defined by.
  • If the source interface is provided, then for each clause, declare the type of each event argument after destructuring the event.
  • If the source interface is provided, then warn on macro-expansion if the number of arguments in the lambda-list does not match the number of arguments defined by the event.
Status
REPORTED
Submitter
~shunter
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
Enhancement