Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Conventions

Some languages require that certain classes of names be capitalized or not, to distinguish them. Lilo is flexible, so that it can match the naming conventions of the system it is being used to specify. That said, here are the conventions that we use in the examples:

  • Module and systems are lowercase snake_case. So e.g. climate_control rather than ClimateControl.
  • Important: The name of a module or system must match the file name it is defined in. For example, module climate_control or system climate_control must be defined in a file named climate_control.lilo.
  • Names of signals, params, defs, specs, arguments and record field names are lowercase and snake_case. So e.g. signal wind_speed rather than signal WindSpeed or signal windSpeed.
  • Types, including user defined ones, should be capitalized and CamelCase. E.g.
    type Plane = {
      wind_speed: Float,
      ground_speed: Float
    }