Freon Documentation (version 0.5.0)

The Typer Definition

This tutorial describes the possibilities of defining a type provider (or typer, for short). In the typer definition you provide the information necessary to do type checking.

Three-level definition

As explained in Three Levels of Customization the generated typer can be defined in three levels. For each concept in the AST the typer will

  1. use the hand-made typing rule(s), when present. Otherwise, the typer will
  2. use to the typing rule(s) generated from the typer definition, when this definition is present.

There are no default typing rules, so the typer does not have a fallback to a third level, that is, when ask for the type of an AST node the typer will simply return a null value.

Content

In Typer Files you can find an explanation of the parts of a typer definition. In Typer Example you can find an example of commonly used types and how to define them.