Set up the infrastructure to modify the AST tree in the type checker between the building context stage and the actual type checking stage.
The same application logic set up can also be used for another pass after the type-checking stage if this is deemed necessary.
We now identify when something is a constructor based on the name of the function, the arguments, and the Context.
Added Tests
Happy Constructors for primitives desugar correctly to Python primitive constructors
Relevant issues
Fixes #187 Works towards #186
Summary
Set up the infrastructure to modify the AST tree in the type checker between the building context stage and the actual type checking stage. The same application logic set up can also be used for another pass after the type-checking stage if this is deemed necessary.
We now identify when something is a constructor based on the name of the function, the arguments, and the Context.
Added Tests