Skip to content

Tail recursive optimisation #26

@jamesfer

Description

@jamesfer

Single function typing

  • Pass the name of a let binding to a function declaration
  • Assign a "bottom" type to the function when it is used
  • After typing the function check that the bottom type and the overall type of the function converge

Mutual function typing

  • Before typing the value of a let binding, send out a scout into the remainder of the program to gather all the other variables declared at the same level as this expression.
  • Or perform typing as normal but record any unknown identifiers and that are used in positions where unknown identifiers are not allowed. Then after typing the body, if any of those identifiers were not found, errors should be generated.

Performing the optimisation

???

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions